Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Good morning

Get index of hovered element and relate to pager nth-child

jQuerySnippets

About a 1 minute read

"Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning."

Albert Einstein


1
2
3
4
5
jQuery('#menu-primary > li').hover(function() {
    var index = jQuery(this).index();
    jQuery('#pager a').eq([index]).trigger('click');
    return false;
});