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

  • H3Ctic (old channel)

    H3Ctic (old

    23 Mart 2011
  • justintimberlakeVEVO

    justintimber

    2 EYLÜL 2009
  • RayperEnglishKnight

    RayperEnglis

    24 Kasım 2008