Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Good evening

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

jQuerySnippets

About a 1 minute read

"What you seek is seeking you."

Rumi


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