Foundation - 插件 Abide JavaScript 参考

Foundation 为 abide 插件提供 JavaScript 组件,如下所示。

Foundation.Abide

它指定了 abide 的实例,定义如下。

var elem = new Foundation.Abide(element);
Sr.No. 名称 &描述 类型
1

element

它在 abide 中创建一个 jQuery 对象。

jQuery
2

options

默认插件设置为 override。

对象

函数

以下是 abide 中使用的函数。

.requiredCheck

它检查表单元素是否具有 required 属性。

Sr.No. 姓名 &描述 类型
1

element

jquery 对象用于检查所需属性。

对象

.findLabel

在表单元素中查找标签。

Sr.No. 名称 &描述 类型
1

element

jquery 对象用于检查所需属性。

对象

.addErrorClasses

如标签、表单和输入的 Abide 设置所述,包含 CSS 错误类。

Sr.No. 名称和描述 类型
1

element

jquery 对象用于检查所需属性。

对象

.removeErrorClasses

如 abide 设置所述,从标签、表单和输入中删除 CSS 错误类。

Sr.No. Name Type
1

element

The jquery object is used to check the required attribute.

Object

.validateInput

Validates the input through the form according to the type specified.

Sr.No. Name & Description Type
1

element

The jquery object is used to check the required attribute.

Object
2

form

Find various input element in the entire form.

Object

.validateForm

Helps in validating the form, if invalid inputs are found then it displays a form error element.

Sr.No. Name & Description Type
1

element

The jquery object is used to check the required attribute.

Object

.validateText

Validates the text depending upon the patterns specified in the attribute.

Sr.No. Name & Description Type
1

element

The jquery object is used to check the required attribute.

Object

.validateRadio

Validates the radio input depending upon whether it is required or not.

Sr.No. Name & Description Type
1

group

The jquery object is used to check the required attribute.

String

.resetForm

The styles and inputs are reset.

Sr.No. Name & Description Type
1

$form

The jquery object is used to check the required attribute.

Object

foundation_plugins.html