2011-12-27 4 views
0

私は自分のhtmlコントロールにhttp://uniformjs.comを使用しています。 これを適用するには、次のコードを使用します。このjQueryコントロールバインディングをどのように破棄できますか?

$("select").uniform(); 

このコントロールバインディングをどのように破棄できますか?

私は$("select").uniform('destroy');が他のjQueryプラグインと同じように期待していました。

答えて

1
When cloning, it was imperative that $.uniform.restore('select'); was included, but 
    var cloneCntr = 1; // Global unique counter 
       //var gid = ''; 
      $('#cloneButton1').click(function() { 
       cloneCntr++; // Increment counter 
       var $clonedDiv = $(".ivsites:last").clone(true); 

          $("*", $clonedDiv).add($clonedDiv).each(function() { 
          if (this.id) { 
           this.id = this.id.substring(0, this.id.length - 1) + cloneCntr; 
          } 
          if (this.name) { 
           this.name = this.name + cloneCntr; 
          }     
         }); 


          $clonedDiv.appendTo('#navcontainer ul:last');  
          $.uniform.restore('select'); 
          $("select").uniform(); 

      }); 
-1

これはあなたのために働くかどうかを確認してください:

$('select').replaceWith($('select').clone(false)); 
6

はこれを試してみてください:

$.uniform.restore('select'); 
+0

+1 – wanovak

0

これが私の作品:

匿名downvoteをオフセット
delete $.fn.pluginName; 
関連する問題