|
|
Learning jQuery
|
|
|
|
ncmason
|
|
I've been really interested in this new JavaScript toolkit for it's known ease-of-use. But as of now, I only am familiar with CSS and XHTML. What are some helpful ways for me to get familiar with jQuery?
Thanks,
Mason
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
I've not used jQuery, but we're moving to using Google Web Toolkit (gwt) for all our complex JavaScript work. So far, we all really like it. If that's something you're interested in, you can take a look at the demos here:
http://code.google.com/webtoolkit/examples/
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
jQuery is awesome. For me it was the easiest of the frameworks to learn. I highly recommend it.
You should probably learn basic Javascript before you get too far into jQuery. Some of the little gotchas (like your brackets and parens) will be easier when you know how to watch. Additionally, jQuery doesn't do everything. You'll still need javascript to manipulate data (assuming you have data you want to manipulate). For instance, if you wanted to calculate some information based on numbers, and then populate a form using jQuery, you'll still need to know the javascript to calculate the numbers whatever you want to do with the data when you're done.
A jQuery AJAX call looks like this:
Code:
$("#thing").post('ajax.php',{data:first,d2:second},function(returned){alert('I am magic!')});
Which can be a little daunting to read unless you realize that the second argument is JSON, and the third argument is a callback function so it takes whatever information is returned a does something with it (this one I didn't get for a long time). Quotes can be tricky sometimes too.
The above code can be daunting. It's an AJAX call. For any jQuery statement though, Remember the jQuery structure:
Code:
$(CSS/HTML selector).jQueryFunctionName(argument1,argument2,etc);
It may be helpful to split your arguments into new lines, especially when they are function calls (and declarations for that matter.)
Hope that helps, if you need more help, feel free to PM me or post more here.
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: CO
Status:
Offline
|
|
|
TOMBSTONE: "He's trashed his last preferences"
|
|
|
|
|
|
|
|
Moderator
Join Date: Jun 2000
Location: inside 128, north of 90
Status:
Offline
|
|
I've been wondering this as well, thanks for the webmonkey link LLC, and code sample Sir.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|