When you start enhancing Web pages using JavaScript you begin to see how interactivity can be built into your sites. However, coding sophisticated interaction features into Web pages can be laborious, particularly when it comes to browser compatibility. JavaScript libraries such as jQuery give you the ability to add complex effects to your pages without having to code the implementation details yourself. In this tutorial we will learn how to get started using jQuery in your sites – you can complete the tutorial as long as you have basic HTML, CSS and JavaScript knowledge. Using jQuery in your Pages You can use the jQuery resource in one of two ways – by including the code on your own server or by linking to an existing online repository for it, such as Google Code. Start by creating a new HTML5 page: <!DOCTYPE html> <html> <head> </head> <body> </body> </html> Serve jQuery Locally If you want to use jQuery from your own server, download one of the compressed copies from the jQuery site. Once you have it on your computer, unzip it and upload the file that begins jquery and ends .js to your own server. You can then include a link […]
↧