Skip to content

Instantly share code, notes, and snippets.

View hiennv0802's full-sized avatar

Nguyen Van Hien hiennv0802

  • 13F Keangnam Hanoi Landmark 72 Tower, Plot E6, Pham Hung Road, Nam Tu Liem District, Ha Noi, Vietnam.
View GitHub Profile
@jawdatls
jawdatls / sort.html
Created May 11, 2015 08:29
Sort DOM Elements with jQuery
<ul class="js-people">
<li data-name="John Doe">Mr. John Doe</li>
<li data-name="Trent Richardson">Mr. Trent Richardson</li>
<li data-name="Cindy Smith">Ms. Cindy Smith</li>
<li data-name="Bill Williams">Mr. Bill Williams</li>
<li data-name="Jane Doe">Mrs. Jane Doe</li>
</ul>
<script>
$(document).ready(function(){
var $people = $('ul.js-people'),