jQuery: attribute value selector with OR operator
var selected_airlines = ["UN", "SU"]
$('#journeys').find('.js-flight-airline').filter('[data-code="'+ selected_airlines.join('"],[data-code="') +'"]')
// makes the following string for the filter: '[data-code="UN"],[data-code="SU"]'
Written by Vera Mazhuga
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#