要素をクリックすると、正常に動作する「mouseenter」および「mouseleave」イベントのバインドを解除したいのですが、別の要素がクリックされた場合はそれらを再度バインドしたいと考えています。これは機能しません。
助けはありますか?
コードは次のとおりです。
<script type="text/javascript">
$(document).ready(function(){
$("#shape1 img").click(function(){
$("#shape1 img,#shape2 img, #shape3 img, #shape4 img, #shape5 img").unbind('mouseenter mouseleave');
});
$("#close").click(function(){
$("#shape1 img,#shape2 img, #shape3 img, #shape4 img, #shape5 img").bind('mouseenter mouseleave');
});
});
</script>
どうもありがとう!