DOM Elements Creator

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-14 22:57:24

软件介绍

What is it?

DOM Elements Creator is a simple plugin for creating DOM elements on-a-fly which can be used as part of jQuery statements.

When you want to create new DOM element in pure jQuery you must use document.createElement() method and then new element must be wrapped in $() before it can be used in jQuery context. You can also use HTML code as a selector to create a new object but this way requires writing HTML, which is rarely comfortable. And you must also remember to espace any quotes.
This plugin provides more elegant way to achieve the same effect and requires writting less code.

How to use it?

Just import plugin file after importing the jQuery library and you're set.

Syntax:

$.create(element[, attributes[, children]])

Parameters:

  • string element - name of the element to create
  • object|array attributes - element properties to be set, you shouln't use events attributes here such as onclick, onmouseover etc. since they won't work
  • string|array children - child elements (could also contain text value)

Example:

  • JavaScript/jQuery approach:
    var div = document.createElement('div');
    $(div).attr('id', 'myId').text('myText').appendTo('#myElem');
  • standard jQuery approach:
    $('<div>').attr('id', 'myId').text('myText').appendTo('#myElem');
    or
    $('<div id="myId">myText</div>').appendTo('#myElem');
  • plugin approach:
    $.create('div', {'id': 'myId'}, 'myText').appendTo('#myElem');

Incompatible changes

0.3

Plugin function was renamed from $.new to $.create to fix issues on Internet Explorer.

本文地址:https://codercto.com/soft/d/23400.html

组成论

组成论

张学文 / 中国科学技术大学出版社 / 2003-12 / 35.00元

很多事物中都存在组成(成分、构成)问题。作者创立的组成论为此提供统一的认识模型、分析工具、计算方法和原理。它通过广义集合、分布函数和复杂程度三个概念分析事物组成,并揭示了有随机性的事物都遵守最复杂原理。组成论与系统科学、复杂性研究、信息论和热力学第二定律关系密切。本书介绍了它在自然和社会科学中的许多应用,还提出了信息不可增殖、不同形态的复杂程度的互相转化(复杂度定律)等重要论点。自然科学、社会科学......一起来看看 《组成论》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

MD5 加密
MD5 加密

MD5 加密工具