bratsun
9/30/2015 - 8:38 AM

Simple timeout

Simple timeout

function selectClass(){
  $('.f-formstack select, .webform-client-form select').each(function(){
    var t = $(this).parent();
    if (!t.hasClass('has-select')){
      t.addClass('has-select');
    } else{
      clearTimeout(startClass);
    }
  });
}

if ($('.f-formstack, .webform-client-form').length > 0){
  startClass = setTimeout(selectClass(), 100);
}