Forum Replies Created

Viewing 1 replies (of 1 total)
  • Using jQuery:

    $(document).ready(function(){
      $('#metakeyselect').change(function(){
        if($(this).val() == 'date'){
          $('#metakeyinput').addClass('date-calendar'); // adds class
        }else{
          $('#metakeyinput').removeClass('date-calendar'); // removes class if it already exists, otherwise will carry on.
        }
      });
    });

    can do a vanilla JavaScript if needed?

Viewing 1 replies (of 1 total)