2016-08-14 11 views
2

を行われた後、私はタイトルタグを非表示にするには、いくつかの機能を実行するスクリプトを持っています。これは、mixitupプラグインが使用されている最初のページのロードで正常に動作します。私はソート機能を使用する場合は、スクリプトが動作しなくなり、タイトルタグが表示されます。jQueryの機能が動作しないmixitupソートが

私はmixitupのソートが行われた後も、機能を実行したいです。以下はスクリプトです。私はmouseoverでタイトルタグを非表示にしています。

<script type="text/javascript"> 

$(document).ready(function(){ 
    $("a") 
     .mouseenter(function() {  
      var title = $(this).attr("title"); 
      $(this).attr("tmp_title", title); 
      $(this).attr("title",""); 
     }) 
     .mouseleave(function() { 
      var title = $(this).attr("tmp_title"); 
      $(this).attr("title", title); 
     }) 
     .click(function() { 
      var title = $(this).attr("tmp_title"); 
      $(this).attr("title", title); 
     }); 
    }); 
    </script> 

この問題を解決するのを手伝ってください。

答えて

0

私はあなたのイベントは、あなたの分別により除去されると思います。これは動作するはずです:

$(document).ready(function(){ 
    $(document).on({ 
     mouseenter: function() {  
      var title = $(this).attr("title"); 
      $(this).attr("tmp_title", title); 
      $(this).attr("title",""); 
     }, 
     mouseleave: function() { 
      var title = $(this).attr("tmp_title"); 
      $(this).attr("title", title); 
     }, 
     click: function() { 
      var title = $(this).attr("tmp_title"); 
      $(this).attr("title", title); 
     } 
    }, "a"); 
}); 
+0

ファンタスティック! ..ありがとうございました。あなたのソリューションは、私が問題を解決するのを助けました。再度、感謝します。 :) – Gops

関連する問題