skillberto/jqueryform 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skillberto/jqueryform

Composer 安装命令:

composer require skillberto/jqueryform

包简介

This JavaScript file create HTML DOM with jQuery.

README 文档

README

Now, find some fancy methods:

appendElement, prependElement, insertElement, createElement.

The appendElement inserts content, specified by the parameter, to the end of each element in the set of matched elements. The prependElement inserts content into the beginning, and insertElement removes everything, and puts the new content into the parent element. The last function createElement is the core of the other ones. These methods create a new jQuery instance from the parameters.

All of this need: parent, properties parameters.

First parameter: parent. Type: string (jQuery selector) or object of jQuery instance.

For example: div#box.

Second parameter: properties. Type: object

Element property is rendered for HTML DOM tag, this is necessary.

Value is the property for content/value.

All of others rendered into method .attr like $(element).attr(properties).

In this example, the content (Jee, it's....) will be in the div, what use '#box' id:

new jQueryForm().insertElement('div#box', {element: 'input', id: '#box_1', value: "Jee, it's a pretty content"});

Every function returns with the core object, so more implementation is easy:

new jQueryForm()
    .insertElement('div#box', {"element": "input", "type": "text", "value": 5})
    .appendElement('div#box', {"element": "input", "type": "password", "id": "name", "value": 6, "name": "password"});

If you want, you can change the return value with getJquery method. If this true, the methods return with jQuery instance, else with the jQueryForm instance.

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-05-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固