$.extend($.expr[":"], { over100pixels: function (e) { return $(e).height() > 100 } })
// grammar style // $(expression, context) $('.class', '#class-container') .css ('color', '#f00');
// grammar style
// $(expression, context)
$('.class', '#class-container')
.css ('color', '#f00');
var $body = $("body"); $body.data("isWebTag",true)
var $body = $("body");
$body.data("isWebTag",true)
var $body = $("body");$body.css("width",900)$body.on("click","img",function(){})
$body.css("width",900)
$body.on("click","img",function(){})
// bad $('.container > *'); // better $('.container').children();
// bad $('div#myid'); $('div#footer a.myLink'); // better $('#myid'); $('#footer .myLink');
var $first = $('#first'), $second = $('#second'), value = $first.val(), k = 3, cookiestring = 'SOMECOOKIESPLEASE', i, j, myArray = {};
var $body = $(body);$body .css("width",100) .on("click","img",function(){console.log("img clicked")})
var $body = $(body);
$body
.css("width",100)
.on("click","img",function(){console.log("img clicked")})
var test1 = false,test2; if(test1){ test2 = "yes"}else{ test2 = "no"}//new wayvar test1 = false,test2; test2 = test1 ? "yes" : "no"test2 = test1 && "yes" || "no"
var test1 = false,test2;
if(test1){
test2 = "yes"
}else{
test2 = "no"
}
//new way
test2 = test1 ? "yes" : "no"
test2 = test1 && "yes" || "no"
By Uncle Longmao
introduce some slick jquery using tip, enjoy !
Be cool!