Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Good afternoon

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

jQuerySnippets

About a 1 minute read

"We cannot solve our problems with the same thinking we used when we created them."

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