减少jquery-steps插件中的“最小高度" [英] Reducing 'min-height' in jquery-steps plugin

查看:355
本文介绍了减少jquery-steps插件中的“最小高度"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Steps的HTML中多种形式的插件.您可以从以下URL检查此插件的工作方式.

Steps' plugin for multiple forms in my HTML. You can check how this plugin works from the following URL.

http://www.jquery-steps.com/Examples

在这里我需要的是,根据适用于所有常见最小高度"形式的所有插件.但是我想根据不同步骤的每个单独表单中字段的数量来控制表单的最小高度".有人可以帮我这个忙吗?

What I need here is, as per the plugin for all the forms common 'min-height' is getting applied. But I want to control the 'min-height' of the form as per the number of fields in each individual form of different steps. Can anybody help me out on this.

推荐答案

对于上述问题,以下是解决方法.

For the above issue the below is the solution.

删除jquery.steps.css中以下类的height属性

Remove the height property for the below class in jquery.steps.css

.wizard > .content > .body{height:95%;}

在-jquery.steps.js中搜索

In the - jquery.steps.js search for

stepTitles.eq(state.currentIndex)
  .addClass("current").next(".body").addClass("current");

应该在844行附近.紧接着,添加:

Should be around line 844. Directly after, add:

stepTitles.eq(state.currentIndex).next(".body")
    .each(function () {
    var bodyHeight = $(this).height();
    var padding = $(this).innerHeight() - bodyHeight;
    bodyHeight += padding;
    $(this).after('<div class="' + options.clearFixCssClass + '"></div>');
    $(this).parent().animate({ height: bodyHeight }, "slow");
});

该问题一定会得到解决.

The issue will be surely resolved.

这篇关于减少jquery-steps插件中的“最小高度"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆