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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -