0

I have a select field which contains the following options:

 <select class="course_date_selector applicationSelec">
      <option location="Port Moresby" value="300" style="display:none;" course="285-Port Moresby">Aug-01-2015 </option>
      <option location="Port Moresby" value="200" style="display:none;" course="285-Port Moresby">Aug-05-2015 </option>
      <option location="Location B" value="200" style="display:none;" course="285-Location B">Aug-29-2015 </option>
      <option location="Port Moresby" value="230" style="display:none;" course="284-Port Moresby">Aug-06-2015 </option>
 </select>

Using jQuery, how can show all options where the the course attribute is equal to 285-Location B?

1 Answers1

0

try this:-

$(function(){
  $('.course_date_selector option[course="285-Location B"]').show();
});

Demo

Mohit Kumar
  • 9,065
  • 2
  • 27
  • 43