Tag: jquery steps

jquery-steps:在提交表单时禁用提交按钮

我正在使用jquery-steps.js, 我想在单击提交时禁用提交按钮,并且在提交表单之前永远不要激活它。 原因是如果有人点击提交很多次我收到很多邮件! 注意:我的HTML文件不包含提交按钮,它只显示我包含的js文件 我的js文件看起来像这样。 $(function() { $(“#smart-form”).steps( { bodyTag:”fieldset”, headerTag:”h2″, bodyTag:”fieldset”, transitionEffect:”slideLeft”, titleTemplate:”#index# #title#”, labels: { finish: “Send søknad”, next: “Neste”, previous: “Tilbake”, loading: “Laster…” } , onStepChanging:function(event, currentIndex, newIndex) { if(currentIndex>newIndex) { return true; } var form=$(this); if(currentIndex<newIndex) {} return form.valid(); } , onStepChanged:function(event, currentIndex, priorIndex) {} , onFinishing:function(event, currentIndex) { var form=$(this); […]

Jquery Steps – >按钮单击 – >转到步骤

我在asp.net应用程序中使用jquery步骤向导。 单击按钮时,我在更改步骤时遇到问题。 在file.js中初始化步骤 var WizardFunc = function () { var wizard = null; return { WizardSet: function () { wizard = $(‘#order’).steps({ bodyTag: “fieldset”, transitionEffect: “slideLeft”, headerTag: “h1”, autoFocus: true }); }, WizardStepAdd: function (index, title, contentId) { wizard.steps(“insert”, index, { title: title, content: “” }); }, WizardGoToStep: function (index) { wizard.steps(“setStep”, 1); }, WizardStepRemove: […]

在jQuery Steps中禁用并更改提交按钮的颜色

我看过类似的问题但到目前为止还没有解决方案。 我正在使用jQuery Steps表单,我试图在点击时禁用提交按钮,并且还会更改外观。 我尝试过使用: $(‘finish’).attr(‘disabled’,true); 但这没效果。 当我单击按钮时,它不会禁用该按钮或更改外观。 当我点击两次时,它会向我发送两封带有测试表单的电子邮件。 编辑:我不是要删除“输入”,我正在尝试删除“提交”按钮,jQuery文档列为“完成”。 我的完整JS在下面。 $(function(){ $(“#smart-form”).steps({ bodyTag: “fieldset”, headerTag: “h2”, bodyTag: “fieldset”, transitionEffect: “fade”, titleTemplate: “#index# #title#”, labels: { finish: “Submit Form”, next: “Continue”, previous: “Go Back”, loading: “Loading…” }, onStepChanging: function (event, currentIndex, newIndex){ if (currentIndex > newIndex){return true; } var form = $(this); if (currentIndex < newIndex){} […]

无法将事件绑定到jquery.steps向导中的输入

我正在使用http://www.jquery-steps.com/上的向导。 使用向导的所有内容都非常流畅,但是当我尝试将事件绑定到该向导中的输入字段时,它无法正常工作。 以下是该问题的基本代码: Basic Demo First Step This should be replaced Second Step <pdfsgdf $(“.namer”).change(function(e){ $(“.text”).html($(this).val()); }); $(function () { $(“#wizard”).steps({ headerTag: “h2”, bodyTag: “section”, transitionEffect: “slideLeft” }); }); JSFiddle位于http://jsfiddle.net/m23px/

如何在步骤1中单击“下一步”时获取JQuery-Steps来调用ajax服务

我正在使用jquery步骤,虽然我需要在单击第一个’next’时通过ajax调用ac #service,这是否可以在显示步骤2之前调用并返回? 尽管在加载第2步之后ajax事件返回,但以下代码仍然有效。 非常感谢,任何帮助表示赞赏。 Jquery步骤 http://www.jquery-steps.com/Examples#basic 我注意到了这些方法? 也许这些是我需要的 onStepChanging: function (event, currentIndex, newIndex) onFinishing: function (event, currentIndex) onFinished: function (event, currentIndex) 我的ajax事件 $(function () { $(‘a[href=”#next”]’).click(function () { var url = “…”; $.ajax({ url: url, success: function (response) { // Form fields on second step $(“#EmailAddress”).val(response.Email); $(“#FirstName”).val(response.Firstname); $(“#LastName”).val(response.Lastname); }, error: function () { alert(“something went […]

jquery-steps进入angularjs指令

我正在研究我的第一个angularjs指令。 我希望将jquery-steps( https://github.com/rstaib/jquery-steps )包装成一个指令。 当我尝试将步骤内容中的输入或表达式绑定到它们未绑定的控制器模型时,我的问题出现了。 我所拥有的示例代码如下。 angular.module(‘foobar’,[]) .controller ‘UserCtrl’, ($scope) -> $scope.user = name:’John Doe’ .directive ‘wizardForm’, () -> return { restrict: ‘A’, link: (scope, ele) -> ele.steps({}) } html看起来如下 Step 1 Name: {{user.name}} Step 2 Advanced Info etc 名称为{{user.name}}的内容输出为步骤1中的内容 我仍然是角度的初学者,所以我似乎无法理解为什么内容区域没有附加范围或模型。 任何使我走上正确轨道的提示或线索都会非常有帮助! 编辑:我添加了一个plnkr来显示我尝试过的内容。 http://plnkr.co/edit/y60yZI0oBjW99bBgS7Xd

jQuery Steps – 重置向导,无需重新加载页面

我正在使用jQuery步骤( https://github.com/rstaib/jquery-steps/wiki )来创建一步一步的表单给用户填写。 它工作得很好,但我需要能够重置它。 一旦用户提交了表单(使用ajax以便页面不刷新),我想呈现一个用户新鲜的向导。 有没有办法重置向导? 或者也许重新加载而不重新加载页面?

在jQuery Steps中提交步骤更改

这是我所拥有的代码块: $(“#test-wizard”).steps({ headerTag: ‘header’, bodyTag: ‘.container’, transitionEffect: “slideLeft”, autoFocus: true, onStepChanged: function(event, currentIndex) { $(‘#skills-form’).submit(); return true; } }); 所以你可以看到我正在使用jQuery Steps来构建多步骤表单。 在每一步,我都想将结果(值)发送到后端服务器。 为了做到这一点,我正在使用submit(),但它重新加载页面,这意味着它不会进入表单的下一步。 我需要的是在每一步提交表单,但防止刷新整个页面,导致表单返回到第一步。 当然,我尝试在提交函数上使用event.preventDefault(),但之后它也阻止了对后端的请求(但我只需要阻止刷新页面)。

使用jQuery步骤进行自定义步骤

我在我的应用程序上使用jQuery步骤来实现类似向导的情况。 我无法找到如何更改自定义步骤。 这个有什么帮助吗? $(function () { $(“#wizard”).steps({ headerTag: “h2”, bodyTag: “section”, transitionEffect: “slideLeft”, enableFinishButton: false, labels: { next: $(‘#next’).html(), previous : $(‘#previous’).html() }, onStepChanged: function (event, currentIndex, priorIndex) { if( priorIndex == 0) { var selected = $(‘input[name=radio_wizard]:checked’, ‘#radio_wizard’).val() switch( selected ){ case 1: // GOTO 1 break; case 2: // GOTO 2 break; case […]