I am looking to update the content within a CSS tag using jQuery.
In this instance, I need to change "My content" to "New Content".
Here is the CSS code I have:
a.appari:focus:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: "My content";
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 400px;
}
I attempted to achieve this with the following jQuery code:
function prova() {
{
?>
<script>
(function($){
$(document).ready(function(){
$('.appari').click(function(){
$("<style>.appari:focus:after { content: 'New Content'; }</style>").appendTo( "head" )
});
});
})(jQuery);
</script>
<?php
}
}
Thank you for your assistance.