PDA

View Full Version : Facebox on hover over link text?



cpn
11-30-2012, 01:41 PM
1) Script Title: Facebox image and content viewer (v 1.1)

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

3) Describe problem: I got this to work fine, linking to an external file, clicking on the link text, but I would like instead for the external file facebox to pop up on hovering over the text instead of clicking. Is this possible?

Cheers

Chris

jscheuer1
11-30-2012, 02:55 PM
Where you have:


<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})
</script>

Add the highlighted:


<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
$('a[rel*=facebox]').bind('mouseenter', function(){$(this).trigger('click');});
})
</script>

cpn
11-30-2012, 03:36 PM
thank you very much. :)

C