Functions
- Create an array previous manipulation
.map()
- Filter an array
$.grep( array, function(item){
return item.property > 1;
})
- Describe the type as null, error, array, date, regexp
typeof variable === "function"
- Detect browser by feature detection
Modernizr.load({
test: Modernizr. inputtypes.date,
nope : [
".ext/datepicker.css"
, "ext/bootstrap-datepicker.js"
],
complete : function (){
if( ! Modernizr. inputtypes.date ) {
$("input[type=date]").datepicker();
}
}
});
- Callbacks
var c = $.CallBacks("unique stropOnFalse memory");
// Unique: one function per name,
// stopOnFalse
// memory
c.add( your_function );
c.fire("parameter_your_function")
- $.noConflict();
Release the symbol $ or use different version of jQuery
//previously add tag of version of jquery
var jqversion = $.noConflict(true);
- $.extend
Merge two objects replacing attributes of the first one
Comentarios
Publicar un comentario