I have an unordered list in this format:
<ul>
<li><img src="yahoo.jpg"/></li>
<li><img src="google.jpg"/></li>
</ul>
What I want is when I double click on any image, a jquery pop up open with full image.
Thanks for help.
I have an unordered list in this format:
<ul>
<li><img src="yahoo.jpg"/></li>
<li><img src="google.jpg"/></li>
</ul>
What I want is when I double click on any image, a jquery pop up open with full image.
Thanks for help.
no one will ever do a double click on an image on a website
but you could setup a clickcounter and if(clickcounter > 1) doStuff();
$("ul li img").dblclick(function(){
var src = $(this).attr("src");
// popup code here..
// um.. which jquery popup plugin?
});
or.. you should try using jQuery plugin for image gallery. try fancy box or jquery lightbox plugin
with jquery lightbox, you just call lightbox()
function
$('ul li a').lightBox();
you can use this function
$(document).ready(function() {
$("li").bind("dblclick", function(){
var src = $(this).attr("id");
alert(src);
});
})
i use alert, but you can open any jquery box.