CodingJavascript peeps: check out JQuery

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  ALL
33478.1 
I was looking at this on Friday, it's a library which makes working with the DOM much easier. Basically, instead of using getElementsByTagName and getElementById, you use CSS-style strings to query the DOM and various built-in functions to manipulate it. For example, to add the class "foo" to all divs, you just use

Javascript code:
$(document).ready(function() {
  $("div").addClass("foo");
});


You can add event handlers similarly easily.

You can also use classes as part of the query string, and CSS3 stuff like "#stuff li first" to select the first list item in <ul id="stuff">.

Here.

There are two types of creationist: morons and liars.
0/0
 Reply   Quote More 

 From:  Ben (BENLUMLEY)  
 To:  THERE IS NO GOD BUT (RENDLE)     
33478.2 In reply to 33478.1 

I've been using it for some time, and can confirm that it is somewhat super.

 

It has several ways to query the dom, as well as what you mention, some of which were really clumsy before.

 

It also has functionality to make all sorts of nice things easily - ajax requests, animation, form validation, etc. And there are loads of plugins.

 

I also use prototype, which is a similar thing and is also nice.

0/0
 Reply   Quote More 

 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
33478.3 In reply to 33478.1 
I've still not looked at JQuery- I use Mootools, which by all accounts does just the same stuff.

I'm yet to find a decent resource that compares all of them so I can make an objective choice... as it is, I know how to program Mootools, so I'll stick with it. Prototype is (or was, when I tried it) far, far too big.
0/0
 Reply   Quote More 

Reply to All    
 

1–3

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats