jQuery Reverse Order uses jQuery to reverse the order of DOM elements on your page.
To use jQuery Reverse Order on your site or blog, just follow these simple steps:
Click on the link below to download the source code:
The file, jquery_reverseorder.zip, contains the script, an example page, and the jQuery library. Once downloaded, unzip and upload the script to a relevant location on your hosted site.
Add a link to the jQuery library and to the javascript file in the page(s) you'd like jQuery Reverse Order implemented. Remember to adjust the path to properly point to the location of the javascript file:
<script language="JavaScript" type="Text/JavaScript" src="/path/to/javascript/jquery-1.2.3.min.js"></script>
<script language="JavaScript" type="Text/JavaScript" src="/path/to/javascript/jquery_reverseorder.js"></script>
A packed version is also included in the .zip called "jquery_reverseorder.packed.js".
Create a collection of DOM elements inside a common parent. Here's an example:
<div id="items">
<p class="item">item 1</p>
<p class="item">item 2</p>
<p class="item">item 3</p>
<p class="item">item 4</p>
</div><!-- items -->
Then add a single line of javascript, referencing the items to be reversed, to reverse the order:
$('#items .item').reverseOrder();
You could also use:
$('#items p').reverseOrder();
Here's another example using the native unordered list as a collection:
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
</ul>
Then add a single line of javascript to reverse the order:
$('ul li').reverseOrder();
You can see more examples and uses of jQuery Reverse Order by clicking here.
Currently, the jQuery Reverse Order script has been tested and confirmed on the following browsers:
This arc90 tool is licensed under the Creative Commons Attribution-Share Alike 3.0 license.
You can send feedback on jQuery Reverse Order at the arc90 blog.
JS中方法: //排序方法 function sortRefresh(){ $('#tableAttrEdit1 tbody').jSort({ sort_by: "td span.sort", is_num: "true", item: "tr", order: "asc" }); } jSort插件提供几个参数可配置: item:指向需要排序的html内容
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script type="text/javascript" src="../static/js/jquery-3.3.1.min.js"></script> <script type="text/j
jQuery Core 1.9 Upgrade Guide Overview jQuery Migrate Plugin Changes of Note in jQuery 1.9 .toggle(function, function, ... ) removed jQuery.browser() removed .live() removed .die() removed jQuery.sub(
//基础数据 var RiverRiver2 = [ { id: 1, pId: 1, name: "名称", pname: "所属", lenth: 8, Score: 87, tongB: -1, huanB: 1, user: "滕永新", usertell: "69555721" }, { id: 1, pId: 2, name: "名称", pname: "所属", lenth: 8
Consider a call to the plot function: var plot = $.plot(placeholder, data, options) The placeholder is a jQuery object or DOM element or jQuery expressionthat the plot will be put into. This placehold
JS中方法: //排序方法 function sortRefresh(){ $('#tableAttrEdit1 tbody').jSort({ sort_by: "td span.sort", is_num: "true", item: "tr", order: "asc" }); } jSort插件提供几个参数可配置: item:指向需要排序的html内容