Sha256: a9992d015aef7ac4b3a4a38fd79400bd992be1225715f9d89e04fa2595a22f4c
Contents?: true
Size: 1.54 KB
Versions: 2
Compression:
Stored size: 1.54 KB
Contents
/* * HTML5 Forms Fallback for older and unsupporting browsers * Using jQuery, jQuery UI, Modernizr, Webforms2, and other jQuery Plugins * * 2010 Cristian I. Colceriu * * www.ghinda.net * contact@ghinda.net * */ var initSlider=function(){$('input[type=range]').each(function(){var $input=$(this);var $slider=$('<div id="'+$input.attr('id')+'" class="'+$input.attr('class')+'"></div>');var step=$input.attr('step');$input.after($slider).hide();$slider.slider({min:$input.attr('min'),max:$input.attr('max'),step:$input.attr('step'),change:function(e,ui){$(this).val(ui.value)}})})};if(!Modernizr.inputtypes.range){$(document).ready(initSlider)};var initSpinner=function(){$('input[type=number]').each(function(){var $input=$(this);$input.spinner({min:$input.attr('min'),max:$input.attr('max'),step:$input.attr('step')})})};if(!Modernizr.inputtypes.number){$(document).ready(initSpinner)};var initDatepicker=function(){$('input[type=date]').each(function(){var $input=$(this);$input.datepicker({minDate:$input.attr('min'),maxDate:$input.attr('max'),dateFormat:'yy-mm-dd'})})};if(!Modernizr.inputtypes.date){$(document).ready(initDatepicker)};var initColorpicker=function(){$('input[type=color]').each(function(){var $input=$(this);$input.ColorPicker({onSubmit:function(hsb,hex,rgb,el){$(el).val(hex);$(el).ColorPickerHide()}})})};if(!Modernizr.inputtypes.color){$(document).ready(initColorpicker)};var initPlaceholder=function(){$('input[placeholder]').placehold({placeholderClassName:'placeholder'})};if(!Modernizr.input.placeholder){$(document).ready(initPlaceholder)};
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
html5forms-rails-0.1.4 | vendor/assets/javascripts/html5forms.fallback.min.js |
html5forms-rails-0.1.3 | vendor/assets/javascripts/html5forms.fallback.min.js |