私のコードはこんな感じです
$(document).ready(function(){
nodeClick(elm = '');
});
function nodeClick()
{
if(elm != ''){
var obj = '';
}else{
obj = $('.hitarea')
}
obj.live('click',function(){
$(this).addClass('something');
$(this).attr('something',1);
//lots of this reference are here
});
}
elm変数が空の場合、クリック関数を自動的に呼び出す必要があります。つまり、クリックなしで呼び出す必要があります。クリックなしでその関数をトリガーするにはどうすればよいですか。