Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Best practice: Remove active state from dropdown menu Re: Best practice: Remove active state from dropdown menu

#105225
instantMash
Member

My understanding is that if you cache $(‘.dropdown-button.active’) as a variable, that will prevent jQuery from diving back into the DOM.

http://jsfiddle.net/mGAs4/2/