I am working in some code that was left behind by an old programmer. He uses
$.data(item, "onlyIfCheckShow")();
and I am wondering if jquery.data even returns a function. It seems quite odd. Below is the data code pulled directly from the jquery.js:
data: function( key, value ){
var parts = key.split(".");
parts[1] = parts[1] ? "." + parts[1] : "";
if ( value == null ) {
var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
if ( data == undefined && this.length )
data = jQuery.data( this[0], key );
return data == null && parts[1] ?
this.data( parts[0] ) :
data;
} else
return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
jQuery.data( this, key, value );
});
}