Sha256: d3b5c90c24cf92384804e74b8fe8e283b3794daf5022e6fc708bbe3bce5d946a
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
// Forms Demo // ----------------------------------- (function(window, document, $, undefined){ $(function(){ if ( ! $.fn.validate || ! $.fn.steps ) return; // FORM EXAMPLE // ----------------------------------- var form = $("#example-form"); form.validate({ errorPlacement: function errorPlacement(error, element) { element.before(error); }, rules: { confirm: { equalTo: "#password" } } }); form.children("div").steps({ headerTag: "h4", bodyTag: "fieldset", transitionEffect: "slideLeft", onStepChanging: function (event, currentIndex, newIndex) { form.validate().settings.ignore = ":disabled,:hidden"; return form.valid(); }, onFinishing: function (event, currentIndex) { form.validate().settings.ignore = ":disabled"; return form.valid(); }, onFinished: function (event, currentIndex) { alert("Submitted!"); // Submit form $(this).submit(); } }); // VERTICAL // ----------------------------------- $("#example-vertical").steps({ headerTag: "h4", bodyTag: "section", transitionEffect: "slideLeft", stepsOrientation: "vertical" }); }); })(window, document, window.jQuery);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radius-rails-3.1.4 | app/assets/javascripts/radius-theme/modules/demo/demo-wizard.js |