Sha256: 13509b756b6c5ec172973480882ee5496fcd15a40bb6ebaddbf8cecb33497656
Contents?: true
Size: 1.64 KB
Versions: 2
Compression:
Stored size: 1.64 KB
Contents
/ moment script src="/sinatra-hexacta/vendors/moment/moment.min.js" / select script src="/sinatra-hexacta/vendors/chosen/chosen.jquery.min.js" / datetime script src="/sinatra-hexacta/vendors/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.js" /wave effect script src="/sinatra-hexacta/vendors/waves/waves.min.js" /check /script src="/vendors/bootstrap-growl/bootstrap-growl.min.js" /check /script src="/vendors/bower_components/bootstrap-sweetalert/lib/sweet-alert.min.js" /scrollbar script src="/sinatra-hexacta/vendors/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js" /validator script src="/sinatra-hexacta/vendors/bootstrap-validator/validator.js" /check /script src="/vendors/bower_components/bootstrap/js/affix.js" /check /script src="/vendors/sparklines/jquery.sparkline.min.js" javascript: $(function() { //shorthand document.ready function $('form').on('submit', function(e) { //use on if jQuery 1.7+ $(this).find(':input[required]').each(function() { if ($(this).val() == "" || $(this).val() == null) { $(this).parent().removeClass("success"); $(this).parent().addClass("error"); } else { $(this).parent().removeClass("error"); $(this).parent().addClass("success"); } }) }); $('.chosen').on('change', function(change, deselected) { //selected OR deselected if ($(this).val() == "" || $(this).val() == null) { $(this).parent().removeClass("success"); $(this).parent().addClass("error"); } else { $(this).parent().removeClass("error"); $(this).parent().addClass("success"); } }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra-hexacta-0.0.2 | lib/sinatra/views/libraries/include_js_after.slim |
sinatra-hexacta-0.0.1 | lib/sinatra/views/libraries/include_js_after.slim |