SORU
10 EYLÜL 2009, PERŞEMBE


JQuery nesne öğesi çıkarın

bir WordPress kullanmak çok kolay DOM düğüm kaldırmak için yapar. Ama nasıl bir WordPress kullanmak nesneden bir şey kaldırılsın mı?

CEVAP
10 EYLÜL 2009, PERŞEMBE


Eğer bir WordPress kullanmak nesne düğüm çıkarma söz ediyorsanız, filter not işlevlerini kullanın. See here for more.

Nasıl filter kullanmak için:

var ps = $('p');

//Removes all elements from the set of matched elements that do 
//not match the specified function.
ps = ps.filter(function() {
  //return true to keep it, false to discard it
  //the logic is up to you.
});

ya

var ps = $('p');

//Removes all elements from the set of matched elements that 
//do not match the specified expression(s).
ps = ps.filter('.selector');

Nasıl not kullanmak için:

var ps = $('p');

//Removes elements matching the specified expression 
//from the set of matched elements.
ps = ps.not('.selector'); 

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Google Developers

    Google Devel

    23 AĞUSTOS 2007
  • The Dubstep FX

    The Dubstep

    5 Mart 2011
  • vgeller1

    vgeller1

    22 Kasım 2009