4Manuals

  • PDF Cloud HOME

如何在多步骤表单上启用浏览器后退和下一个箭头键 Download

    具有Iframe表单的HTML文件,使用框架外的按钮通过JQuery提交表单按钮 CSS / JS-如何覆盖一个孩子而不是其他孩子的父母过渡 反应:更改方向后触发重新渲染和offsetWidth的重新计算 我的Javascript从'string'转换为'integer'或'number'无效 如何删除外部索引并合并内部json 在React Native 转换后的SELECT下拉列表(以ul为单位)不会显示在SAFARI 图片无法通过javascript刷新 如何在react图表上的datakey中操作DateTime 在Cypress中保存变量

我有一个多步骤表单,我想启用浏览器的上一个和下一个箭头键,该键位于左侧顶部。 当前,浏览器的两个箭头键已被禁用,但是如何启用它以及如何使用表单的下一个和上一个按钮? 这是我的脚本:

 $('.next1_2').click(function () {
      var pgrbar = 2 * 5.56;
      $('#step-1').css('display', 'none');
      $('#step-2').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-2').removeClass("slideInLeft").addClass("slideInRight");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);

  });

  $('.next2_3').click(function () {
      var pgrbar = 3 * 5.56;
      $('#step-2').css('display', 'none');
      $('#step-3').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-3').removeClass("slideInLeft").addClass("slideInRight");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);
  });
  $('.next3_4').click(function () {
      var pgrbar = 4 * 5.56;
      $('#step-3').css('display', 'none');
      $('#step-4').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-4').removeClass("slideInLeft").addClass("slideInRight");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);
  });

  $('.prev2_1').click(function () {
      var pgrbar = 1 * 5.56;
      $('#step-2').css('display', 'none');
      $('#step-1').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-1').removeClass("slideInRight").addClass("slideInLeft");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);
  });
  $('.prev3_2').click(function () {
      var pgrbar = 2 * 5.56;
      $('#step-3').css('display', 'none');
      $('#step-2').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-2').removeClass("slideInRight").addClass("slideInLeft");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);
  });
  $('.prev4_3').click(function () {
      var pgrbar = 3 * 5.56;
      $('#step-4').css('display', 'none');
      $('#step-3').css('display', 'block');
      $('.progress-bar').width(pgrbar + '%');
      $('#step-3').removeClass("slideInRight").addClass("slideInLeft");
      $('html, body').animate({
          scrollTop: $('.app-container').offset().top
      }, 100);
  });

0 个答案:

没有答案



Similar searches
    如何在此代码中正确编码max,min和avg? CSS中是否有确切的上一个节点? 如何在wordpress中将网站更改为特定位置 如何使用RecyclerView在Android中解析复杂的JSON 在呈现一个组件时,是否从HTML隐藏空白/ HTML溢出以在Router中实现div兄弟?