function addOptionsListeners(arrayOfObjects){
  $('select').on('change', event => {
    $('section').hide();
    const $selected = $(event.target);
    const type = $selected.val();

    arrayOfObjects.forEach(object =>{
      if(type === object.keyword){
        $(`.${type}`).show();
      }
    });
  });
}
//Adds listener to select, filters images based on option chosen

Adds listener to select, filters images based on option chosen
Adds listener to select filters images based on option chosen
function addOptionsListeners(arrayOfObjects){
  $('select').on('change', event => {
    $('section').hide();
    const $selected = $(event.target);
    const type = $selected.val();
    arrayOfObjects.forEach(object =>{
      if(type === object.keyword){
        $(`.${type}`).show();
      }
    });
  });
}
function addOptionsListeners ( arrayOfObjects ) { $ ( 'select' ) . on ( 'change' , event => { $ ( 'section' ) . hide ( ) ; const $selected = $ ( event . target ) ; const type = $selected . val ( ) ; arrayOfObjects . forEach ( object => { if ( type === object . keyword ) { $ ( ` ${ type } ` ) . show ( ) ; } } ) ; } ) ; }
Adds listener to select, filters images based on option chosen
Adds listener to select filters images based on option chosen