2014-08-28 1 views

Répondre

0

Essayez ceci:

$("span[itemprop='employmentType']").each(function(){ 
if($(this).text()=='Third Party Jobs') 
{ 
    $(this).addClass("wpjb-job-apply"); 
} 
}); 

OU

$("span[itemprop='employmentType']").each(function(){ 
if($(this).text()=='Third Party Jobs') 
{ 
    $(this).css('display','none'); 
} 
}); 

CSS:

.wpjb-job-apply{ 
    display:none; 
} 
+0

si (a ce texte) Tiers emplois ajouter l'affichage: aucun à la classe .wpjb-job-apply –

+0

@ChristianKobbernagel ... je pense que c'est ce que vous voulez .. –

+0

$ ("span [itemprop = 'employmentType']"). each (function() { if ($ (this) .text() == 'Tâche tierce') { $ ('.wpjb-job-apply ') .css (' affichage ',' aucun '); } }); –

0

Que diriez-vous:

$(function() { 
    $('span[itemprop="employmentType"]').each(function(){ 
     $this = $(this); 
     if($.trim($this.text() == "Third Party Job"){ 
      $this.addClass("wpjb-job-apply"); 
     } 
    }); 
}); 
Questions connexes