Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • Wanna get into jquery
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4
Wanna get into jquery
Tweet Topic Started: Dec 14 2008, 02:06 PM (806 Views)
slayer766 Dec 14 2008, 07:35 PM Post #11
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Why learn XML over jQuery? XML doesn't even do anything without another language to cope with...
Offline Profile Goto Top
 
Agent Moose Dec 14 2008, 07:49 PM Post #12
Member Avatar
SMF for Free Moderator

Posts:
838
Group:
Former Staff
Member
#14
Joined:
Jul 9, 2008
When I started coding, I first learned jQuery. (Thanks to Dan that is :P)

jQuery is very simple:
Code:
 
$("elements").function();

That isn't a real function for jquery, but that is basicly how it is set up.

See, If you wanted to get the HTML for the top_info ID, you would do this:
Code:
 
$("#top_info").html();


The number sign represents ID's. If you want to get a class, use a period instead of the number sign.

If you want to change hte HTML in the top_info, you would do this:
Code:
 
$("#top_info").html("Text");


See, jQuery is over all simple.
Now, there may be somethings that you can't do with jquery, which means you will need to use javascript.

Good thing for jquery, they have the .each() funciton, which basically is looping elements in javascript, which allows you to use javascript inside that function:
(jquery):
Code:
 
$("element").each(function(){
if(if this is true){
// do this
};
});


(javascript):
Code:
 
var x = document.getElementsByTagName("element");
for(i=0;i<x.length;i++){
if(if this is true){
// do this
};};


Those to things will do the exact same thing.
Edited by Agent Moose, Dec 14 2008, 07:51 PM.
You could call me Troy :P | The World of Moosey | Newest Blog: SMF for Free Spam Code

Current Project: Zetaboard Javascript Tester (click on the link in the Submenu)

ZetaBoard Javascript Tester Features:
- Code Test box
- Counts how many open brackets/parentheses and closed brackets/parentheses you have in your code to make sure that your code will work.
- New: Inspect Element
Offline Profile Goto Top
 
thbp Dec 14 2008, 08:25 PM Post #13
Some basic Kid learning Javascript

Posts:
46
Group:
Member
Member
#1,779
Joined:
Dec 13, 2008
id learn xml to learn ajax/e4x
LINUX FOR LIFE
J4L
EHW
Offline Profile Goto Top
 
Eureka DC Dec 14 2008, 09:09 PM Post #14
Member Avatar


Posts:
183
Group:
Member
Member
#40
Joined:
Jul 16, 2008
thbp
Dec 14 2008, 08:25 PM
id learn xml to learn ajax/e4x
You're going straight into AJAX when you barely know the basics? :O Sounds fair game. Let me know how far you get with that. :lol:
DO NOT PM ME FOR HELP, SUPPORT OR REQUESTS!
Posted Image
-------------------------------------------------------------------
I'm a part of you, you're a part of me
And I know it's wrong but I can't get free
You're like my first bad habit
How am I gonna give you up?
~ Vanessa Hudgens
-------------------------------------------------------------------
Offline Profile Goto Top
 
HolySavior Dec 15 2008, 12:24 AM Post #15
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
well if you want to learn jQuery your just in luck. with us starting to do video tutorials feel free to suggest to us what you want to learn first and we will make it!
Offline Profile Goto Top
 
thbp Dec 15 2008, 08:43 AM Post #16
Some basic Kid learning Javascript

Posts:
46
Group:
Member
Member
#1,779
Joined:
Dec 13, 2008
well it would be nice if you started with like what jquery was then go into basics like the function and parts of it and like what $ does (i already know $ but it may help others)
LINUX FOR LIFE
J4L
EHW
Offline Profile Goto Top
 
HolySavior Dec 15 2008, 11:08 AM Post #17
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
well free to post in our video tutorials topic in the feedback forum
Offline Profile Goto Top
 
Eureka DC Dec 15 2008, 11:44 AM Post #18
Member Avatar


Posts:
183
Group:
Member
Member
#40
Joined:
Jul 16, 2008
thbp
Dec 15 2008, 08:43 AM
well it would be nice if you started with like what jquery was then go into basics like the function and parts of it and like what $ does (i already know $ but it may help others)
The $ in $("blah") is just a function name, with the name being $. You usually see functions like:
Code:
 

function foo () {
// do something
}


jQuery just has a function like that but it's named $. Nothing spectacular about it other than it's a short-cut way of starting some jQuery command executions. If you want, you can always replace $("something_here") with jQuery("something_here") because the $() function pretty much passes its argument to the jQuery() one anyways. So the $() is there just for short-cut purposes.
DO NOT PM ME FOR HELP, SUPPORT OR REQUESTS!
Posted Image
-------------------------------------------------------------------
I'm a part of you, you're a part of me
And I know it's wrong but I can't get free
You're like my first bad habit
How am I gonna give you up?
~ Vanessa Hudgens
-------------------------------------------------------------------
Offline Profile Goto Top
 
slayer766 Dec 15 2008, 12:05 PM Post #19
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Agent Moose
Dec 14 2008, 07:49 PM
When I started coding, I first learned jQuery. (Thanks to Dan that is :P)

jQuery is very simple:
Code:
 
$("elements").function();

That isn't a real function for jquery, but that is basicly how it is set up.

See, If you wanted to get the HTML for the top_info ID, you would do this:
Code:
 
$("#top_info").html();


The number sign represents ID's. If you want to get a class, use a period instead of the number sign.

If you want to change hte HTML in the top_info, you would do this:
Code:
 
$("#top_info").html("Text");


See, jQuery is over all simple.
Now, there may be somethings that you can't do with jquery, which means you will need to use javascript.

Good thing for jquery, they have the .each() funciton, which basically is looping elements in javascript, which allows you to use javascript inside that function:
(jquery):
Code:
 
$("element").each(function(){
if(if this is true){
// do this
};
});


(javascript):
Code:
 
var x = document.getElementsByTagName("element");
for(i=0;i<x.length;i++){
if(if this is true){
// do this
};};


Those to things will do the exact same thing.
thbp......did you even see that?
Offline Profile Goto Top
 
HolySavior Dec 15 2008, 12:21 PM Post #20
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
i will be making some Javascript and jQuery basics video for people soon hopefully
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code University · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4

Track Topic · E-mail Topic Time: 7:44 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy