views:

114

answers:

5

In my project i have to create an Accordion.which is better to use Jquery or Ajax

+2  A: 

AJAX is for server-side requests, to get or send new data for your page (without a full page reload), it's an alltogether different concept.

For the accordion, I think you're looking for the jQuery UI accordion, though there are many options out there.

Nick Craver
A: 

AJAX, or Asynchronous Javascript and XML, is an umbrella term for the technologies and methodologies involved in loading data from the server without a page request.

jQuery is a Javascript library.

Javascript is a client side scripting language.

As @Nick said, the jQuery UI accordion plugin is a good choice for the accordion.

Finbarr
jQuery is not a framework. It is a library.
sundowatch
Right enough @sundowatch
Finbarr
+1  A: 

Hmmm, Apples, Hammers, or music? how to decide?

Cheeso
Hammers, then you can make every problem a nail.
CiscoIPPhone
Apples, hammers and music all suck! You want horses!
bobince
What, no cheese ball?
Mark Schultheiss
A: 

See this accordion made with jquery:

http://sarfraznawaz.wordpress.com/2010/03/09/creating-stylish-sliding-menu-with-jquery/

Sarfraz
+2  A: 

That's a bit like asking "What should I use to get to work today? A car or an accelerator pedal?"

AJAX is a general term that refers to the techniques that make use of client-side scripting (e.g. JavaScript) to communicate with the server between page-loads.

jQuery is a framework (a set of libraries and tools) that make writing JavaScript simpler and easier. It includes facilities for using AJAX.

Will Vousden
Watch out @Will, @sundowatch might tell you that jQuery is a library if you're not careful.
Finbarr
@Finbarr: thanks for the heads up, I'll watch out for him.
Will Vousden