Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jqueryが見ている場所、マウスがある場所(ホバー/マウスオーバー)のコードがあります
$(".hover tr").live("mouseleave",function(){ $(this).find("td:last-child").html(" "); });
何らかの理由で、これは機能していません:(
コードの最初に jquery スクリプトを入力する必要があります。
この例を試してください:
<script src="http://code.jquery.com/jquery-1.8.1.min.js" type="text/javascript"></script>
<head>タグの中に入れる
<head>
これはlive()、1.9 の時点で jQuery から削除された (および 1.7 から廃止された) ためと考えられます。代わりに、次のon()方法を使用する必要があります。
live()
on()
$('.hover tr').on('mouseleave', function(){ // do stuff });
もちろん、この回答は、最新の jQuery を使用していることを前提としています。
参考文献: