shawnchin / jquery-cron

A jQuery plugin to provide a simplified interface for users to specify cron entries
http://shawnchin.github.io/jquery-cron
MIT License
177 stars 118 forks source link

Add the ability to pass 'selectClass' #19

Open jfinstrom opened 9 years ago

jfinstrom commented 9 years ago

Add the ability to pass "selectClass" for the inputs. This allows people to pass things like "form-control" in Bootstrap so the selects match other site formatting.

Example:

$(document).ready(function() {
    $('#cron').cron({'selectClass':'form-control'}); // apply cron with default options
});

html

<div id="cron" class="form-inline"></div>

Note bootstrap makes all inputs 100% and assumes a vertical layout. Adding "form-inline" gives the horizontal layout used by jquery-cron