javascript - jquery.data API and event binding[Unable to understand] -
please explain following snippet [read on internet , couldn't understand]:
var $this = $(this); $this.data('key', $this); $this.on('click.key', function(e) { // });
i know jquery.data dumps in jquery cache can accessed via $.cache how can use key
css selector when binding event.
edit
found out answer question. doesn't have data api, rather, more related event namespacing.
jquery api reference here
Comments
Post a Comment