Jquery in A Nutshell
Jquery in A Nutshell
Neil Middleton
Development Manager
Monochrome Ltd
Development Manager at
Monochrome
Creator of Feed-Squirrel.com
Web Developer since 1996
• Fast
• Simple
• Extendable
• Cross-browser
Firefox 1.5+
Internet Explorer 6+
Safari 2.0.2+
Opera 9+
Known problems with FF 1.0.x, IE 1-5.x, Safari 1.x, Safari 2.0, Opera
1.0-8.5, Konqueror
Google Salesforce
Dell Newsgator
Digg The Onion
MSNBC Feedburner
Amazon Vodafone
Intel Linux.com
BBC Logitech
Newsweek Mozilla
AOL Wordpress
Oracle Drupal
Cisco Systems Trac
Technorati Joomla
Sourceforge
getfirebug.com
$(“#div1”).show();
$(“#div2”).addClass(“alert”);
<div id=”body”>
<h2>The header</h2>
<div class=”contents”>
<P>...</P>
<P>...</P>
</div>
</div>
$(“div”)
<div id=”body”>
<h2>The header</h2>
<div class=”contents”>
<P>...</P>
<P>...</P>
</div>
</div>
$(“#body”)
<div id=”body”>
<h2>The header</h2>
<div class=”contents”>
<P>...</P>
<P>...</P>
</div>
</div>
<div id=”body”>
<h2>The header</h2>
<div class=”contents”>
<P>...</P>
<P>...</P>
</div>
</div>
$(“div:has(div)”)
<div id=”body”>
<h2>The header</h2>
<div class=”contents”>
<P>...</P>
<P>...</P>
</div>
</div>
$(“form input:last”).click(function() {
$(“#menu”).slideDown(“slow”);
});
$(“#body”).css({
border: “1px solid green”,
height: “40px”
});
$(“#menu”).slideDown(“slow”);
$(“div”).hide(500,function(){
$(this).show(500);
});
$(“#body”).load(“sample.html”);
$.getScript(“test.js”);
$.ajax();
$(“div”).hide();
$(“div”).hide().color(”blue”);
$(“div”).hide().color(”blue”).slideDown();
jQuery.fn.debug = function() {
return this.each(function() {
alert(this);
});
};
jQuery.log = function (message)
{
if(window.console) {
console.debug(message);
} else {
alert(message);
}
}
jquery.com
docs.jquery.com
jquery.com/plugins
learningjquery.com
neilmiddleton.com
neil@monochrome.co.uk