Archives For jquery

Collection of Basic and Minimal Website Concepts

Hey guys. Today we’re going to take a look at how you can build a single-page application (SPA) supporting graceful degradation using some of jQuery’s Best friends; DocumentCloud’s Backbone.js, Underscore.js, LAB.js and jQuery templating to name but a few.

Alex Sexton has been giving a great presentation highlighting these tools in few recent conferences and I thought it would be useful to write up a tutorial to compliment their use.

 

The SPA application we’ll be building today is a three-level bookmarkable image gallery. Before we get started, please feel free to check out the demo below or download the sources for the tutorial.

To Read More  Click Here

Credits to : addyosmani.com

jQuery is all around you. You see it on hugely popular sites such as Twitter and Facebook. When you visit Yahoo! or Google, there it is. Someone’s Aunt Mary has a snazzy Web site with jQuery effects for her pet photography business. But there you are, using animated gifs. Your site looks dated, and you aren’t keeping up with your competition. It’s time for you to add the power of jQuery to your site.

You can download jquery at Jquery website. Click here to download

To create your page, do the following:
1. Open the text editor or HTML editor of your choice.
2. Type the following code into the text document:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html>
<head>
<title>My Test Page</title>
<script type=”text/javascript” src=”js/jquery-1.4.min.js”></script>

<script type=”text/javascript”>
$(document).ready(function(){
//Do things here
alert($(‘img’).attr(‘alt’));
});
</script>
</head>
<body>
<p>This is my test page.</p>
<img src= “images/home.gif” height=”28” width=”28” alt=”This is a test
image.”>
</body>
</html>

3. Save test.html and view it in your Web browser.
You now see the alt of the image displayed in the alert box.