Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

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


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;
});

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog