Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Nov 5, 2008

Cool Utiliy : Show Hide with JQuery!

Previously while working with javascript and div, it did get me very confused,
with code required to hide/show a paragraph. Well it seems jquery has the
feature nicely put in, implementing the css div hide in a short few lines,
of code.
Here it is :-
$(document).ready(function(){
$('#faq').find('dd').hide().end().find('dt').click(function() {
$(this).next().slideToggle();
});
});

and include it in the HTML code :-

Oct 17, 2008

So How Did I learn Jquery? : Basics of Jquery!

So how did i learn up this elusive language ?

Searchin google .. simple as that...
but even when you do that u do get a host of stuff,
thrown at you, most of which either you dont need or specifically,
which you dont understand.

So as usual started looking for keywords basic, newbie, startup :)
First light at the end of the tunnel.. comes from http://docs.jquery.com/Tutorials
 
A Complete list of required tutorial in the form of articles, to choose from.  I took off with, Tutorials:Getting_Started_with_jQuery (obviously!). 
Now remeber you need to have some knowleged of Javascrip and Dom both of which are available
at www.w3schools.com/ . Not exactly basic but it has an extensive tutorial + code samples +
API explanations.
 
So started crawling.  Observations on making the first file :-
Try not dividing into multiple folders just to seperate the js and html files.
Start off with one single shot.  The '{' and '(' are quite a pain to follow.
 
Result of first code from the mentioned page:-
(Code not accepted hence posted the image)