[Vuejs]-Strange behavior with JQuery and Vuejs

0👍

You can not compare if two jQuery objects are the same. But you can compare DOM objects.

To know more about the comparison of jQuery object you can have a look at this Stackoverflow Answers

This link also has an explanation

0👍

The dollar ‘$’ in the console isn’t jQuery. It’s unable to access jQuery because it’s not in the global scope. Besides, when comparing two jQuery objects, they always return false because they are not equal. In the console, because two objects aren’t jQuery objects, they are both null instead, thus they are equal.

Leave a comment