Hello everyone! I tried to find the solution all around the web, but no luck, so I came here.
I am using a jQuery plugin called FancyBox (http://fancy.klade.lv), which is a LightWindow clone, and it works great. Now, I want to have a clickable DIV that will allow me to call the FancyBox function to show the content of another page in a window like it does when I click on a single A link. The problem is that upon clicking on the DIV the new page opens the usual way, not in a FancyBox window. I need to somehow make jQuery tell the browser that clicking within that specified DIV should display the page using the FancyBox function. --------------------------------------------------------------------------------------------------------- $(document).ready(function() { $("a.imgA").fancybox(); $(".clients").click(function(){ window.location=$(this).find("a.imgA").attr("href"); return false; }); }); --------------------------------------------------------------------------------------------------------- <div class="clients"> <div class="clientsImg"> <a href="gov.html" class="imgA"><img src="images/client- gov.jpg" alt="" /></a> </div> <div class="clientsText"> <h3 id="h-gov"><span>Government and Law Enforcement Agencies</ span></h3> Blah, blah... </div> </div> <!-- /clients --> --------------------------------------------------------------------------------------------------------- I presume it has something to do with window.location and the fact that the browser jumps straight to the URL jQuery fetches from that link bypassing the FancyBox function. Hope this is enough code to understand my issue. Some help will be immensely appreciated!