我的代碼是這樣的jQuery的不同事件的相同功能
$(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
});
}
如果榆樹變量是空的,我需要調用我可以觸發函數了點擊與出click.how即自動點擊功能
等等,什麼?你能解釋一下嗎? – Blender
我想在elm變量爲空時自動觸發點擊函數 – coolguy