PDA

View Full Version : Image Thumbnail viewer II - Disable OnClick action



davidrk
01-19-2012, 09:23 AM
1) Script Title: Image Thumbnail viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem: Is it possible to remove the OnClick event for the Image Thumbnail viewer II? I only want the Hover event to occur. At the moment if the user clicks on the thumbnail it opens the large image in a new window. Thanks!

jscheuer1
01-19-2012, 10:36 AM
Add this script to the head of the page:


<script type="text/javascript">
jQuery(function($){
$('a[rel=enlargeimage]').click(function(e){
e.preventDefault()
});
});
</script>

davidrk
01-19-2012, 07:15 PM
Thanks John! Works a treat. Really appreciate your help.