Skip to content

Instantly share code, notes, and snippets.

@bratsun
Created September 30, 2015 08:38
Show Gist options
  • Save bratsun/530efbc3161d3ffeda6c to your computer and use it in GitHub Desktop.
Save bratsun/530efbc3161d3ffeda6c to your computer and use it in GitHub Desktop.
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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment