1

つまり、現在、結果のリストを表示しています...次に、結果にフィルターを配置し、jQuery内の.live()を使用して別の結果のリストを取得します。

qTipを使用しているときに問題が発生することはありません。これは現在、このように実行されています...すべての詳細はありません。

$('.contact').each(function() {
   $(this).qtip({
      // These are my options within here
   });
});

これは、.live()機能を使用して結果をフィルタリングするためのコードの場合です。

$('.filterContacts').live('click', function(){
    var filterId = $(this).attr('id');  

    $.ajax({
    url: 'classes/class.Post.php?a=filterContacts',
    dataType: 'html',
    data: {
        filter: filterId 
    },
    success: function (responseText) {
        $(".contacts").html(responseText);
    },
    error: function() {
        alert("Oops... Looks like we're having some difficulties.");  
    }
    });
    return false;
});

だから今私のqTipは私のフィルタリングされた結果に取り組むのが好きではありません...私ができることはありますか?どんな助けでも感謝するでしょう!

更新: .contactsは、すべての.contactdivを囲むdivです。 IE:

<div class="contacts">
  <div class="contact">FistName, LastName</div>
  <div class="contact">FistName, LastName</div>
  <div class="contact">FistName, LastName</div>
</div>
4

1 に答える 1

1

成功ブロックでコードを実行する必要があります。

$('.filterContacts').live('click', function(){
        var filterId = $(this).attr('id');  

        $.ajax({
        url: 'classes/class.Post.php?a=filterContacts',
        dataType: 'html',
        data: {
            filter: filterId 
        },
        success: function (responseText) {
            $(".contacts").html(responseText);
            // call your each function here...
    $('.contact').each(function() {
       $(this).qtip({
          // These are my options within here
       });
    });


        },
        error: function() {
            alert("Oops... Looks like we're having some difficulties.");  
        }
        });
        return false;
    });
于 2010-11-12T01:04:27.473 に答える