I have a jQuery code that is supposed to insert some content after every paragraph on news articles. Like this:
$(document).ready(function() {
$("<a>The link inserted in jQuery</a>")
.insertAfter("p")
.attr("href", "http://bi.ng")
.addClass("abonnerreklame")
;
});
It works in the Fiddle that I've made, but not on my actual site. The reason behind that, have to be that the articles use dynamic PHP to render (WordPress):
<?php the_content(); ?>
Is there a way to get the JavaScript to work, even when the output is generated from PHP? I hope you can understand my question - please help if you have the knowledge to do so.
Here is my test site, by the way.
Thanks!