反转HTML元素的顺序 [英] Invert order of HTML elements

查看:72
本文介绍了反转HTML元素的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下配置:

<div><div id='box1'>&nbsp;</div><div id='box2'>&nbsp;</div><div id='box3'>&nbsp;</div><div id='box4'>&nbsp;</div></div>

我需要做的是反转div的顺序

what i need to do is to invert the order of the divs

<div><div id='box4'>&nbsp;</div><div id='box3'>&nbsp;</div><div id='box2'>&nbsp;</div><div id='box1'>&nbsp;</div></div>

有没有一种快速的方法来使用jQuery而不克隆,删除和替换项目?

is there a fast way to do this with jQuery without cloning, removing and replacing the items?

推荐答案

我猜您在寻找 jQuery逆序插件.

这篇关于反转HTML元素的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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