several minor updates and migrations...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-24 03:12:01 +04:00
parent f4b137768a
commit f79a295e19

26
jli.js
View File

@ -1,4 +1,10 @@
/**********************************************************************
* JavaScript Lib
* at this point this is just a place I put most of the generic stuff I
* use.
*
* P.S. the name "jli" just stands for Java script LIb, like how it
* looks...
**********************************************************************/
var DEBUG = true
@ -164,7 +170,25 @@ function setElementScale(elem, scale){
}
/************************************************ jQuery extensions **/
/*********************************************************************/
jQuery.fn.reverseChildren = function(){
return $(this).each(function(_, e){
return $(e).append($(e).children().detach().get().reverse())
})
}
jQuery.fn.sortChildren = function(func){
return $(this).each(function(_, e){
return $(e).append($(e).children().detach().get().sort(func))
})
}
/**********************************************************************
* vim:set ts=4 sw=4 : */