Last Updated: February 25, 2016
·
723
· vero4ka

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"]'