views:

78

answers:

3

What are the top 5-10 most often used jQuery native API functions? (please do not suggest jQuery() function itself as there is no doubt this is the most often used one) If it is possible please also provide scenarious they cover.

The reason to ask this question is my attempt to create a jQuery-like API to the Ample SDK JavaScript GUI Framework (there it is mainly matter of re-pointing functions, thanks to all functionality implementation present). This framework has already standard APIs (DOM Level 2-3), however from what I hear, many developers do not know well DOM APIs, others don't like those APIs, but they like concise API of jQuery (both convinient functions and fluid programming practice)

A: 

jQuery.ajax and it's equivalents (post, get, etc) are invaluable when making AJAX calls.

DOM read/write functions val and attr are also quite useful, but one of the reasons that jQuery's DOM functions are so useful is not necessarily the functions themselves (other than the fact they are cross-platform) but that jQuery's selectors are such a powerful means of working with the DOM.

Justin Ethier
jQuery's selectors API is the jQuery() (or $ alias) function itself, I asked in the question not name this function as it is clear it is most useful. Thank your for the rest of the answer.
Sergey Ilinsky
+1  A: 

I find I'm using .val, .attr, .addClass, .removeClass, .hasClass, .hover, .click the most.

.val / .attr / .hasclass I use to identify pre-set values. I usually use custom attributes on elements, and getting them back with attr is great. Like storing if I've already pre-loaded content of an element. The rest is pretty straight forward.

ruinernix
A: 

I use .animate, .hide and .show a whole lot. Very easy to use and gives the website the little extra if you add values to hide and show :)

Mathias Bak