Friday 25 March 2011

JQuery

One of the pass criteria in this project is that i have to include JQuery in my site, JQuery is a shorthand referencing system for Javascript, using it effectively is easy and can transform your site.

First i downloaded the latest JQuery script (huuuuge Javascript document) and filed it in my website folder. Next i refferenced it in the head of each of my HTML documents:




Next i wrote out the instruction i wanted (also in HTML docs):

This Language is particularly busy looking, but is pretty straight forward and you really don't nned much of it. The above example will fade in a Div called 'serve' when the Div 'services' is clicked ('serve' is hidden with CSS (display:none;), but the JQuery command will beat this coding, and make it visible. Because the instruction in the JQuery is 'fadeToggle' the div can be revealed and hidden again with repeated clicks.

No comments:

Post a Comment