This question already has an answer here:
- jQuery order by date in data attribute 3 answers
- What is the easiest way to order a <UL>/<OL> in jQuery? 3 answers
<ul id ="sort">
<li id = '2014-02-07'>tralala<li>
<li id = '2013-02-09'>tralala<li>
<li id = '2014-01-04'>tralala<li>
<li id = '2011-09-05'>tralala<li>
</ul>
I want that the result to be :
<ul id ="sort">
<li id = '2014-02-07'>tralala<li>
<li id = '2014-01-04'>tralala<li>
<li id = '2013-02-09'>tralala<li>
<li id = '2011-09-05'>tralala<li>
</ul>
I want to sort desc the li using the id in JQuery or Javascript . Thx