views:

194

answers:

5

jQuery is a very popular JavaScript framework nowadays. You can tell that based on number of jQuery tags on this site for example.

I haven't used any other JS frameworks and I would like to get your opinion on some of features you can think of that the library is missing.

  • What would you change in the project?
  • What would you add?
  • Are there any features that you think are worthless?
  • What features famous in other JS frameworks you would like to see in jQuery?
+1  A: 

I would love to see Prototype's currying features native in jQuery. It's not difficult to roll your own, but native is always nicer.

cpharmston
+1  A: 

jQuery Live changes

I would like to see jQuery live to work with all types of events. Currently to bind some of the events (change and submit of those are most frequent in my opinion) you still need to use a plugin like Live Query.

$.postJSON()

I think it would be a good idea to add a $.postJSON() method. Currently we have a .getJSON() that is similar to $.get() it just sets the type of data returned to json. However when it comes to POST communication you need to fill this extra field yourself for each call.

Of course this can be easily fixed but I would like to see that as a part of core library.

$.postJSON = function(url, data, callback) {
    $.post(url, data, callback, 'json');
};
RaYell
If they were to keep adding 'helper' functions the jQuery lib would be 200k. Seriously it is not hard to create this yourself rather than expecting the core to provide all these helpers. Personally I would do away with all the little helpers (.get, .post, .load, .getJson) and just have the base .ajax func.
redsquare
So why there is a `$.getJSON()` helper? This doesn't seem consistent for me.
RaYell
Ask John on the jquery dev google group http://groups.google.com/group/jquery-dev
redsquare
+2  A: 

Not sure whether anybody else would want it, but I wouldn't mind a .revert() function that "undoes" any changes you've made to an item or selector since the page was loaded.

eg. You might change the colour, size, and a couple of attributes of a div while you go through. Calling .revert() on the selector would undo these changes.

Damovisa
+2  A: 

The JavaScript libraries I used the most are jQuery, YUI and ExtJS (Core).

My favorite though remains jQuery, but I still would like some of ExtJS Core's functionality in it.

First time I worked with ExtJS I fell in love with it's inheritance system, I personally think it's very ingenious and I would love to have it in jQuery. Still I recently found one of John Resig's projects (the creator of jQuery) 'Simple JavaScript Inheritance' (you can find it here) and it seems to be very powerful and small.

Another feature I would like to see in jQuery would be a much more intelligent extension system.

Other things I wouldn't change in jQuery, I think it's the most perfect choice for a JavaScript library, for a very broad range of applications.

For widgets I prefer ExtJS than jQuery UI

Christian Toma
+2  A: 

jQuery is lacking in UI department. There are thousands of plugins but all of them use different skins and styling. They should concentrate on their official UI library and try to make it as rich and consistent as ExtJS.

serg