Hello all,
I am trying to use mootools:
http://mootools.net/ to enlarge search results on a php page like in this example:
http://demos.mootools.net/Mouseenter
However if the results return say 100 results the search will span this across 5 pages, if you scroll on to the next set of results the dropdown stops working
I have modified the code to loop over the element names to create the event for each search result, but it still only works for the first page of results:
Code:
window.addEvent('domready', function()
{
for( i=0; i<100; i++ )
{
// The same as before: adding events
$('table_'+i).addEvents(
{
'mousedown': function(){
// Always sets the duration of the tween to 1000 ms and a bouncing transition
// And then tweens the height of the element
this.set('tween', {
duration: 1500,
transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
}).tween('height', '200px');
},
'mouseleave': function(){
// Resets the tween and changes the element back to its original size
this.set('tween', {}).tween('height', '20px');
}
});
}
});