I was wondering is it possible to cache the api of jQuery because I am using the same api every time for multiple elements?
For example.
- $("#id1").css("display","none");
- $("#id2").css("display","none");
- $("#id3").css("display","none");
- $("#id4").css("display","none");
- $("#id5").css("display","none");
I know that you can assign all the selectors to one api, however I have a script which checks the url for specific words, so I was wondering is it possible to cache the api to improve performance?