javascript - Launching jQuery plugins depending on the user location -


my senior gave me task put little javascript , jquery plugin code in 1 file execute these plugins, depending if page has .classes or #ids. thinking best way that.

will simple if -> else in case or should go further , create .each?

i think growing amount of plugins , other client-side code, there significant performance issues. far have 5-10 self-invoking functions.

you can use want if have small amount of plugins check.

if not should choose list: http://jsperf.com/jquery-each-vs-for-loop/73


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -