Prinzhorn / skrollr-menu

skrollr plugin for hash navigation
MIT License
285 stars 143 forks source link

Adds setActiveLink method. #50

Closed pedrocorreia closed 10 years ago

pedrocorreia commented 10 years ago

Hi, i've added a method to add a class to the currently active link. It defaults to active but it's also available in the options object as activeClass.

I've also added a menuSelector option to identify the menu html element so it's easier to target and avoid complex dom queries. This defaults to '.skrollr-menu'.

skrollr.menu.init(s, {
    activeClass: 'active',
    menuSelector: '.skrollr-menu'
});
Prinzhorn commented 10 years ago

Can't review since the diff is useless (I guess you changed every whitespace)

pedrocorreia commented 10 years ago

My IDE must have changed the indentation on the whole file. I'll try to get it right and open another pull request.