So there is a h2 that contains the following class entry-contentH2
and I'm simply trying to include the following divs before that h2 but it's not even showing anything. I can't seem to figure out why it isn't adding it, because when I try it without any divs and I test with just text it works.
jQuery(function($) {
$(".entry-contentH2").before("<div class="video_player"><iframe id="ytplayer" type="text/html" width="640" height="390" src="https://www.youtube.com/embed/'.$recipe->recipe_video.'?fs=1" frameborder="0"></iframe></div>");
});
What is the reason as to why .before doesn't work in this case?
Here is the code: https://jsfiddle.net/or9Lbbq0/2/