Can anybody tell me, if I call ex.
var obj1 = $('#element_id')
var obj2 = $('#element_id')
will obj1 refer to the same javascript object as obj2 does, or there will be 2 different objects, having the same HTML element they wrap?
And what about complex selectors, like (‘.my_class, .my-class2’), which wrap collection of objects?
They will be different objects.
It’s very easy for you to test yourself:
The first alert will be “true”. The second will be “false”.