Click Events From Hell
Click events are a godsend from hell. Here's how you can avoid at least one of the many problems they bring to the table: the end of a drag is not a click.
Continue reading "Click Events From Hell"Click events are a godsend from hell. Here's how you can avoid at least one of the many problems they bring to the table: the end of a drag is not a click.
Continue reading "Click Events From Hell"When using jQuery.data()
to interact with data-attributes selecting elements with that attribute will not work. jQuery('.selector').data('name');
reads the data-name="foobar"
attribute from a DOMElement. This attribute could be used in a selector, say jQuery('[data-name="foobar"]').hide()
. But if you use jQuery.data()
to set or update such an attribute, your selector would fail.
When using jQuery.data()
to interact with data-attributes selecting elements with that attribute will not work. jQuery('.selector').data('name');
reads the data-name="foobar"
attribute from a DOMElement. This attribute could be used in a selector, say jQuery('[data-name="foobar"]').hide()
. But if you use jQuery.data()
to set or update such an attribute, your selector would fail.