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

  • Felice Musique

    Felice Musiq

    22 NİSAN 2014
  • PCDIY

    PCDIY

    16 AĞUSTOS 2013
  • POGProductionz

    POGProductio

    27 NİSAN 2012