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

"There is one thing one has to have: either a soul that is cheerful by nature, or a soul made cheerful by work, love, art, and knowledge."

Friedrich Nietzsche


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