Home › Forums › CSS › need your feedback about my theme › Re: need your feedback about my theme
March 23, 2013 at 8:50 pm
#129468
Musama
Member
thank you guys @markomarkogame actually i did it using a js plugin called scrollToLoad
& here is the function //SELECTED MENU SCROLL
$(window).scroll(function() {
var currentNode = null;
$(‘.section-area’).each(function(){
var currentId = jQuery(this).attr(‘id’);
if(jQuery(window).scrollTop() >= jQuery(‘#’+currentId).offset().top – 95)
{
currentNode = currentId;
}
});
$(‘.primary-navigation li, .responsive-navigation li’).removeClass(‘selected’).find(‘a[href=”#’+currentNode+'”]’).parent().addClass(‘selected’);
});