奇妙な問題が発生しています.ajaxを使用して動的に生成されるリスト項目にホバー機能を追加しましたが、何も起こっていません.コードはエラーなしで実行されていますが、効果はありません.mouseenterとmouseoutのアラートも表示されません.アラートは時々ポップアップしますが、毎回ではありません。次のコードを使用しています。
$('.category_list li').live("mouseenter", function() {
alert('I m here');
$(this).find('.category_list').css('text-decoration','underline');
}).live("mouseleave", function() {
alert('I m gone');
$(this).find('.category_list').css('text-decoration','none');
});
私のhtmlコードは
htmlData.push('<ul class="category_list">');
htmlData.push('<li><a href="javascript:void(0);" onclick="callGetApplicationDetails('+iIndex+',0);" >'+categoryName+'</a></li>');
私は非常にひどく立ち往生しているので、私を助けてください。
ありがとうヘミッシュ