Closed mfields closed 10 years ago
Updated this to cache those selectors.
The code doesn't get run every time though. It only runs if PortfolioPressJS.submenu isn't set. After it runs, PortfolioPressJS.submenu is set to true. It won't run again unless the size of the browser drops below 780px and is then expanded again to a larger size.
In
portfolio_desktop_submenus()
it's probably better to store the result of$(this).find("ul")
in a variable that can be reused instead of re querying multiple times. Especially because this function is called on window resize.