这篇文章主要介绍了jquery移动节点的实现方法,主要涉及append()方法的使用技巧,需要的朋友可以参考下,具体实现方法如下:
方法很方便简单,使用 append()方法即可。代码如下:
<html>
<head>
<title>jquery移动节点</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(function(){
$("button").click(function(){
$("p").append($("p"));
});
});
</script>
<style type="text/css">
h5{color:blue;}
p{width:300px;height:60px;border:solid 1px green;}
p p{color:red;}
</style>
</head>
<body>
<h5>jquery移动节点</h5>
<button>点我</button>
<p>哈哈哈哈哈哈,太搞笑了</p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/xiazai/js/6695">
<img src="https://img.php.cn/upload/jscode/000/287/557/6265f7129693e219.png" alt="简易实用的jQuery自动播放焦点图插件">
</a>
<div class="aritcle_card_info">
<a href="/xiazai/js/6695">简易实用的jQuery自动播放焦点图插件</a>
<p>一款超简单jQuery自动播放焦点图插件</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="简易实用的jQuery自动播放焦点图插件">
<span>61</span>
</div>
</div>
<a href="/xiazai/js/6695" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="简易实用的jQuery自动播放焦点图插件">
</a>
</div>
<p>你太幽默了</p>
</body>
</html>以上就是本章的全部内容,更多相关教程请访问jQuery视频教程!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号