Skip to content

Commit

Permalink
- Version: 1.1.13 Build 20240314
Browse files Browse the repository at this point in the history
	- 调整jQueryDOM数组形式插入元素的方式,prepend和before倒转数组以确保插入顺序和数组顺序一致。
  • Loading branch information
road0001 committed Mar 14, 2024
1 parent d8254dc commit 12992f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# JQuery DOM

- Version: 1.1.13 Build 20240314
- 调整jQueryDOM数组形式插入元素的方式,prepend和before倒转数组以确保插入顺序和数组顺序一致。

- Version: 1.1.12 Build 20240124
- 优化dom_attr的处理逻辑和性能。
- 优化dom_attr传入规则,防止传入无效字段。
Expand Down
4 changes: 4 additions & 0 deletions jquery.extensions.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ if(typeof jQuery===`function`){
let default_children={
tag:undefined,attr:undefined,html:undefined,attachType:`append`
};
if(attach_type==`prepend` || attach_type==`before`){
//往前插入时,将数组调转,以确保插入顺序和数组顺序一致
dom_tag.reverse();
}
for(let cur of dom_tag){
cur={
...JSON.parse(JSON.stringify(default_children)),
Expand Down

0 comments on commit 12992f7

Please sign in to comment.