In Programming Language Low-level does not mean bad or slow, the meaning is based on their access and abstraction level. Low-level are typically lower in the abstract hierarchy. For example C
is a low level language because it can give you direct assembly level coding but it does not give you an interface. C++
is a mid level language because it gives you both low-level access like C and high level abstraction layer with a windows UI. Java
is a high-level language it only gives you top level coding environment and the JVM
handles others like memory management, etc.
Similarly, low-level jQuery.data
, it gives you flat access to all attributes stored in data
namespace, but also gives you access to all data saved by jQuery
itself and other plugins. But $(....).data
only gives you high level access, means it abstracts all other access and data and namespaces and gives you only what you need, the data
for the selector
only (mentioned in $(..)
).
So, in general you are to do this -
- Avoid using
jQuery.data
or $.data
- Use
jQuery(....).data
or $(....).data