javascript - My jQuery function is loads an HTML, but that HTML does not load a different jQuery selector from a different function (from flowplayer) -
my jquery function loads html, html not load different jquery selector different function (from flowplayer)
flowplayer("player", {src: "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", cachebusting: true, wmode: "transparent"}); $('#options li a').click( function (evt){ evt.preventdefault(); $('#options li').removeclass('current'); $(this).parent('li').addclass('current'); var rackvideo = $(this).attr('href'); //jquery pulls info link var rackoutput = '<a href="http://c3426439.r39.cf0.rackcdn.com/pritchett/'+ rackvideo +'" id="player" style="display:block;width:348x;height:216px; display:block;">'+ '<img src="http://www.p2ortho.com/wp-content/uploads/2010/10/intro-thumb.jpg" alt="introduction video" title="introduction video" width="348" height="216" class="alignnone size-full wp-image-620" />'+ '</a>'; $('#slidedata').html(rackoutput); });
id="player" in html output suppose call flowplayer function, not working. doing wrong? anyhelp thanks.
the following line...
flowplayer("player", {src: "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", cachebusting: true, wmode: "transparent"});
...must appear right after line:
$('#slidedata').html(rackoutput);
why? because when id="player"
element exists in document.
Comments
Post a Comment