jQuery: The Write Less, Do More JavaScript Library

Blog » The Path to 1.1

Posted December 27th, 2006 by John Resig

Just a quick update so that everyone knows what’s going on: The jQuery Dev Team is currently working on the upcoming 1.1 release of jQuery. So SVN is going to be changing rather significantly during the next couple weeks. Here’s the current game plan:

  • jQuery 1.1a January 7th - A quick alpha release to help everyone test their code and get it moved over to the upcoming 1.1 release.
  • jQuery 1.1 January 14th - This will be the official release, to coincide with jQuery’s 1 year anniversary.

It’s important to note that jQuery 1.1 will not be backwards compatible with 1.0. The changes will occur in different ways, but so far, this is what is planned to change:

  • Methods like .oneclick() and .unclick() will be going away in favor of .one(”click”) (new) and .unbind(”click”). We found that these methods weren’t used enough to warrant the 70+ API entries that they required.
  • Selectors :nth-child(), :gt(), :lt(), and :eq() will all be starting count at 1 instead of 0, in line with the CSS specification. (This is a bug fix, but causes an incidental API change)
  • Some CSS helper methods are going away, like: .color() and .background(). You should start moving over to using .css(”color”) and .css(”background”) instead.
  • Some attribute helper methods like .title() and .rel() are going away. You should start using .attr(”title”) and .attr(”rel”) instead.

A lot of this is being done to help reduce the magnitude of methods that are included in the jQuery API. Having 70+ less entries will significantly reduce the size of the documentation, along with making it easier to maintain and read.

If you’re interested in the direction that the jQuery code base is heading in, please feel free to subscribe to the jQuery Dev Mailing List where the jQuery Dev Team discusses all of these issues in depth.

Update: I forgot to mention that there will be a compatibility plugin that’ll help you transition over to jQuery 1.1. This way, you can continue to use .oneclick() (and all the other methods) into the foreseeable future (even though it may not be in the jQuery core).


30 Responses to “The Path to 1.1”

  1. Henrik Says:

    Wonderful!

    I really like that you try to keep JQuery as light as possible and simply only making some tricky things easier to handle, like events and AJAX.

    JQuery have helped me tremendously!

    Thanks to all of the JQuery-team!

  2. Ilja Heckmann Says:

    The mentioned changes definitely make sense. One suggestion though: How about changing .one(”click”) to .once(”click”)? This name seems to describe better what the function is actually meant for. :)

  3. falcon Says:

    jquery is fast becoming one of my favorite web technologies :) .
    1) One of the things that often trips me up is how similar many methods seem to be. For example, in the DOM manipulation section, the difference between the following is not obvious: before(..), prepend(…), insertBefore(…), and since each of those have several implementations, the library starts to look larger than needed.

    2) DOM traveral and manipulation is wonderfully easy with jquery, I would suggest adding some manipulators for specific widgets. For example, provide a way to access columns of a table (can be confusing for newbies since columns are spread across rows, and rows might be spread across thead, tbody, tfoot, etc.).

    3) Improve the plugins page. Provide a way to see new plugins, updated plugins, requeste plugins, etc. Also make some plugins ‘first class,’ in other words, some plugins become important enough that either they should be included with jquery or somehow made ‘official’ plugins (therefore more than one person is responsible for maintaining them). A couple of examples are: table sorter, drag & drop, DOM, easy DOM creation, etc.

    4) Perhaps provide some sort of data binding framework, so an array could be bound to a list (or a multi-dimensional array bound to a table) with a simple function. Allow this binding to update the html widgets when the underlying array is changed, (and vice versa). Allow users to ‘hook’ together widgets, such a clicking one list updates another list….although probably this effort needs to be taken up by a jquery guru, rather than including it in the core.

  4. Jörn Says:

    Thanks falcon for your suggestions.

    1) This concerns the API docs, as the underlying implementation mostly don’t care about what parameter you pass in. But the documentation for those methods can be reduced by merging the different parameters into one method description.

    If you find API documentation problems, please post them here: http://jquery.com/dev/bugs/bug/353/

    2) Very good point. Selecting table columns is very tricky when working with big tables, as you need to rely on native properties when available. For a start, the intersting code could be extracted from the tablesorter into a seperate plugin.

    3) I thought about putting different sort of plugins on their own page. Would that help, for a start?

    4) That should start as a plugin. There are already some with a sort of databinding, especially those table row editor plugins. It would be intersting to abstract parts of them for a more general data-binding approach.

  5. Yehuda Katz Says:

    Columns:

    Something like $(”table td:nth-child(1)”) should return all of the cells in the first column. It might get trickier with colspans.

  6. Steve O Says:

    Quick question… what about methods like $(’a').click()? Not sure if they are being removed along with unclick() and oneclick()…

  7. Jörn Says:

    click(Function) and click() won’t be removed.

  8. falcon Says:

    Regarding “putting different sort of plugins on their own page.”

    The problem I find is that whenever I come back to the plugins page, I can’t tell which new plugins have been added and which ones have been updated. The plugins already seem to be clustered according to their purpose, perhaps another page which lists the ‘latest’ plugins would do the trick.

    Thanks.

  9. Ajaxian » The Path to jQuery 1.1 Says:

    […] John Resig has posted on The Path to jQuery 1.1 which is not backwards compatible with 1.0. That being said, a compatibility plugin will be available to help the transition. […]

  10. Aaron Heimlich Says:

    There was talk a while ago that methods like find() and filter() would no longer modify the jQuery internal stack but return a new jQuery object with the modified stack to the user (or something like that, sort of how myString.substring(0, 5) returns a completely new string instead of directly modifying the internal representation of myString). Any word on this?

  11. John Resig Says:

    @Aaron - Oh yes, that’s coming in this release! There’s a bunch of features coming (that I didn’t mention in this post); I just wanted to warn people about impending changes, to keep everyone on their toes. There’s a bunch of event handling improvements coming, along with massive speed improvements (I’ll have details on these and more soon.)

  12. Aaron Heimlich Says:

    @John - Sweetness! Can’t wait to hear about all of them!

  13. Marc McHale Says:

    JQuery has been a massive time-saver for me, a superb piece of work, thanks ladies and gents. Will the 1.1 release have any speed increases?

  14. John Resig Says:

    @Marc - Massive speed increases. That’s been a huge focus of ours these past couple weeks. We’ll be releasing some final numbers soon, but we’re looking at 4x-10x speed improvements - with some selectors seeing a 30x speed bump. We’ll be sure to keep everyone posted when its ready for use.

  15. Aaron Heimlich Says:

    @Jörn - If you’re going to keep click(Function) and click(), then I suggest that they be renamed to something less misleading like onClick (although people might confuse that with element.onclick, which may lead them to believe that jQuery only supports “old school” event handling, but atleast it won’t make them think that it calls element.click()).

    If you don’t decide to rename them, then the documentation should strongly emphasize what these methods do and don’t do, so we don’t end up with more confusion like issue #134 (http://jquery.com/dev/bugs/bug/134/)

  16. David Moshal Says:

    Suggestion, instead of:
    one(’click’), unbind(’click’)
    how about:
    bind(’click’), unbind(’click’)

  17. Karl Swedberg Says:

    @David - Actually, there has always been .bind(’click’), and that isn’t going to change in this release. So, there will be:
    .bind(’click’), .one(’click’), and .unbind(’click’)

  18. thai Says:

    Hey! thanks for an awesome library. I just recently made a jump over from mootools because of some of their lack of help. Anyways, I find your library to be superb! However, I was wondering if you have a bind(”rightclick”, function). I’m looking to do a context menu in one of my project. If not, could you guide me to the right direction. Also, it would be nice to have it in your next release, perhaps?

  19. Ryno Says:

    Simply, I love the proposed changes! Less is definitely more in this case and I think you could remove even more ‘convenience’ methods from jQuery along the lines of CSS properties and even .click(), that’s what bind(’click’) is for right?

  20. Charles Says:

    thai: I think you’re looking for the “contextmenu” event. At least that’s what Firefox calls it.

  21. Eric Says:

    If 1.1 is not backward compatible with 1.0, then you should number it 2.0!

  22. Jack Says:

    Sounds good - please keep it clean, compact, consistent, and orthogonal.

  23. ziggy Says:

    >>The problem I find is that whenever I come back to the plugins page, I can’t tell which new plugins have been added and which ones have been updated. The plugins already seem to be clustered according to their purpose

    Sounds like a task for the table sorter plugin!

  24. Websites and stuff (need to think of a real name, I know) » jQuery Says:

    […] In het engels is er genoeg te vinden over jQuery. Het verdient denk ik ook wat Nederlandse aandacht. jQuery maakt het mogelijk om met een kleine JavaScript library (ongeveer 20kb) erg geavanceerde Web 2.0 toepassingen te maken (buzzword alert). Ik ben er in ieder geval fan van. Dingen die je met prototype and scriptaculous zo’n 200kb kosten om te maken zijn met jQuery binnen 20kb geregeld. Enkele regels en het is gedaan. Ik zal zo snel mogelijk een korte tutorial schrijven. Tot slot wil ik nog aankondigen dat er binnenkort een nieuwe versie komt die vanzelfsprekend nog iets beter is. Zie voor meer informatie het jQuery blog.   […]

  25. jQuery: Blog: » jQuery 1.1a Says:

    […] As previously announced, today we’re bringing you the alpha release of jQuery 1.1. We’d really appreciate it if you could help us test this alpha, so that we can have a stand-up release this weekend - just in time for jQuery’s 1 Year Anniversary! (January 14th) […]

  26. » Big Speed Increases with jQuery 1.1a - 15 Days Of jQuery Says:

    […] On the same day I’m about to announce a fantastic new plugin, John Resig announces the release of jQuery 1.1 and promises huge speed increases: We’ll be releasing some final numbers soon, but we’re looking at 4x-10x speed improvements - with some selectors seeing a 30x speed bump. […]

  27. The Path to jQuery 1.1 Says:

    […] John Resig has posted on The Path to jQuery 1.1 which is not backwards compatible with 1.0. That being said, a compatibility plugin will be available to help the transition. […]

  28. jQuery 1.1 alpha Released » D’ Technology Weblog — Technology, Blogging, Gadgets, Fashion, Life Style. Says:

    […] Filed under: Toolkit As previously announced, the first alpha version of jQuery 1.1 is released. The new API will not be compatible anymore with jQuery version 1.0, but a backwards compatibility plugin will be available with the full release of 1.1 for old versions. […]

  29. gxfwmdgvmq Says:

    Hello! Good Site! Thanks you! exyjvltvaxkaa

  30. LỊCH SỬ HÌNH THÀNH VÀ PHÁT TRIỂN CỦA JQUERY : BLOG THIẾT KẾ WEB Says:

    […] December 27th, 2006 Planning for jQuery 1.1: The Path to 1.1 December 12th, 2006 Last bug fix release for 1.0: jQuery 1.0.4 [edit] November […]

Leave a Reply