$.fn.data
function caches retrieved values, and doesn't refresh them when they are updated outside of jQuery (e.g. via the dataset
API), this makes jQuery's $.fn.data
function unusable with libraries like React.$.fn.data
function are stored as JSON values in data-*
attributes set on the DOM nodes, so for instance calling $('#foo').data ( 'test', 123 )
will add the data-test="123"
attribute to the #foo
node, as a consequence of this values that are not JSON-serializable are not supported.0
by jQuery, both when setting it via $.fn.width|height
or $.fn.css
.0
on your own:transform
applied to the element when computing its dimensions.focus
, blur
, mouseenter
and mouseleave
, but alternative bubbling versions of these events exist: focusin
, focusout
, mouseover
and mouseout
.$.fn.on
the non-bubbling version of an event, and then pass $.fn.trigger
the bubbling version of that event, the event handler registered for the non-bubbling version of that event won't be triggered, you must use event names consistently.$.fn.on
and $.fn.trigger
, they will always be made bubble. If you instead trigger non-bubbling events manually, like by calling the focus
method of an element, that event won't be made bubble.event.stopPropagation
or returning false
stops the propagation from the target element, not the delegate element.event.stopImmediatePropagation
instead.$.fn.trigger
.$.fn.after
, $.fn.append
etc.).<span>
element, or create a textNode
node manually.:hidden
.>
, ~
, +
.$.fn.find
, in a unary fashion.> .bar
like you sometimes can with jQuery.$.unique
function only works with DOM nodes.$.unique
function works with any kind of value.