I am trying set selectors as global variables or namespaces.. I am not really sure if this is the correct terminology or if I am approaching this properly.
I would like to be able to do something like the following...
$.namespaceA = $('#myFirstDiv');
$.namespaceB = $('#mySecondDiv');
function myFirstFunction(){
$.namespaceA.hide();
$.namespaceB.css();
}
function mySecondFunction(){
$.namespaceB.show();
}
This is a very basic example of how I want to use them. Basically the end goal is to set a group of global selectors which can be easily used through multiple functions. I don't know if this is right or if this is ideal which is why I am asking. Thanks in advance.