jQuery is a DOM-centric framework. If your main _javascript_ work is to manipulate, traverse, and bind event handlers onto collections of DOM Element, jQuery is, by *far*, the best thing out there.
You can use CSS3 and basic XPath selectors (as well as custom selectors) to grab groups of elements like:
$("ul#root [EMAIL PROTECTED]'someTitle'] > span:visible:first")
You can then pass messages to those groups of elements, get attributes, manipulate them like so:
$("div").addClass("someClass").append("<strong>Some Text</strong>")show();
You can bind event handlers:
$("div").click(function() { // some action to take when any of the matched elements are clicked });
jQuery simplifies AJAX:
$("div#someID").load("some_url.html", function(response) { // some action to take on success });
$.ajax({ method: "POST", url: "some_url.html", params: "param1=text¶m2=text", success: function(response) { // some action to take on success }, error: function() { // some action to take on error } });
So again, jQuery is a good solution if you view your _javascript_ coding as primarily DOM-centric. If you use _javascript_ to access and manipulate DOM elements and collections of DOM Elements, there's nothing like jQuery.
-- Yehuda Katz
http://www.yehudakatz.com
On 8/31/06, Rey Bango <
[EMAIL PROTECTED]> wrote:
I'm new to Ajax and Web 2.0 development and I'm trying to do some
homework before diving into a framework. With the slew of choices out
there its tough to make a decision and much of what I've read really
doesn't answer the question, "What framework is appropriate for what?"
With that said, I'm hoping that you guys might be able to shed some
light on this question. From everything I've read, it seems that the
most mature & best supported opensource frameworks at this point are
JQuery, Dojo, Prototype/Scriptaculous, Mochikit and YUI.
Now I'm not looking for a "vs" style reply. I definitely don't want to
start some type of flame war. I'm interested in knowing when its
appropriate, for example, to use a monster like Dojo or Mochikit as
opposed to something more streamlined like JQuery or
Prototype/Scriptaculous. Or, is JQuery on par w/ Dojo in terms of
OVERALL features and I can use it in much the same fashion as I would Dojo?
From what I can tell, Dojo, apart from its Ajax capabilities, also
incorporates a ton of widget features to help considerably in building
desktop like apps. JQuery, on the other hand, doesn't seem to have these
features (unless I've missed it???) and is geared towards DOM
manipulation and Ajax call handling.
So again, I'd just like some guidance on this point.
Thanks,
Rey...
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Yehuda Katz
Web Developer
(ph) 718.877.1325
(fax) 718.686.4288
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
