I wrote the following code to interact with a joomla video player plugin. Basically the video player embeds videos based on a single line of code like such: {flv avcss="vidMedia" width="720" height="576" autostart="true"}combiC_lumberApp{/flv}. I have multiple videos on the page, but they are hidden via css, so they are not visible on page load. The script is an event listener that changes the css for the link to display when clicked. It works, except that it only picks up the first item clicked. To better clarify, If I have links a, b and c, and I click link a... it loads the video for link a... but if I then click link b, it still loads link a. If I start out with link b, the same thing happens. Here is my script, I though I was using the "this" selector properly... could someone point me in the right direction please? I'm stuck and just cant get past this point....
THE SCRIPT: this.vidPopUp = function(){ $(".vidList li").click(function(){ var vidLink = $(this).find(".vidMedia") $("body").append("<div class='vidPopUp'></div>"); $(".vidPopUp").append("<div class='vidClose'>") $(".vidClose").append(" /callift/templates/calumet_custom/images/closeBtn.gif " + "[CLOSE]") $(".vidPopUp").center(); $('.vidPopUp').expose({ //fade background api: true, color:'#000', opacity:'.8', closeOnClick:false, onLoad: function(event){ $(".vidPopUp").fadeIn(400); $(".vidPopUp").append(vidLink); } }).load(); $(".vidClose").click(function(){ $(".vidPopUp").fadeOut(400, function(){ $(".vidClose").remove(); }); $(".vidPopUp").expose({}).close(); //unfade bckrnd }); }); }; And a piece of the HTML its interactiong with... <li> <div class="vidContainer"> {flv avcss="vidMedia" width="720" height="576" autostart="true"}combiC_lumberApp{/flv} </div> /callift/images/newEquip/vidThumbs/thumbLumberApp.jpg Lumber Application </li> THANKS SO MUCH IN ADVANCE!!! -- View this message in context: http://old.nabble.com/jQuery-%24this-question---NEED-HELP-PLEASE%21-tp26661196s27240p26661196.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.