I have a popup ( new browser window ) that load the first image in a series of thumbnails, but I would like it to load the image that was clicked on in the parent window.
Here is some code ( down near the bottom I would like to change .filter (":first").click(); so it picks up which image was clicked in the parent window....sorta set the index. $(function() { $(".horz_items img").click(function() { // calclulate large image's URL based on the thumbnail URL (flickr specific) var url = $(this).attr("src").replace("_t", ""); // get handle to element that wraps the image and make it semitransparent var wrap = $("#image_wrap").fadeTo("medium", 0.5); // the large image var img = new Image(); // the Caption var strcaption = $(this).attr("title"); // call this function after it's loaded img.onload = function() { // make wrapper fully visible wrap.fadeTo("fast", 1); // change the image wrap.find("img").attr("src", url); // change the captions wrap.find("div").text(strcaption); }; // begin loading the image from flickr img.src = url; // when page loads simulate a "click" on the first image }) .filter(":first").click(); }); -- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.