views:

364

answers:

1

If you look at the right, there is a thumbnail gallery. I need to change the action from 'on click' to 'on hover'. I'm not a javascript developer and changing scripts at this point will be futile (too many hours modifying this one...for other reasons).

If you could help me find a way to change the action from 'on click' to 'on hover', I'll be greatly appreciated.

Link is this (edit: removed the link, issue is solved, thanks)

To help you guys out, you'll be looking for the /js/jquery.galleriffic.js file

A: 

Well looking at the file there are exactly two onclick handlers, which you will have to change to an onmouseenter handler. I don't see why this might take too many hours. Additionally you can just attach an onmouseenter handler to the appropriate link:

$('a.thumb').mouseenter(function(e)
{
    $(this).click();
});

If you don't want it to be clickable anymore you will have to stop the click event bubbling at the bottom element:

$('a.thumb img').click(function(e)
{
    e.stopImmediatePropagation();
});
Daff
"two onclick handlers" Lines 202 and 453, correct?I'm a novice, so, I just take the first section of code and put it in line 202, then line 453.And, if needed add the second line of code you added, at the bottom of the file?
Monkey
655? 584? or was it those?
Monkey
Changing 202 and 453, didn't work (no onhover action).Changing 655 and 584 borked the design and also no onhover action.
Monkey
With the source I posted above you should be able to do attach it separately without having to change the plugin source. If all the links are generated by the plugin you might have to use the live function http://docs.jquery.com/Events/live#typefn instead of the normal handlers.
Daff