

jQuery 1.3 ßeta - auston
http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/

======
bvttf
Misread as "SSeta"

------
wesley
Can anyone tell me what new features can still be added to jquery? It looks
pretty feature complete to me.

I wish they focused more on jquery-ui, as I find that a bit lacking at the
moment.

~~~
jeresig
We aren't really talking about the features of this release, yet, since we
want people to focus on testing (to make sure we didn't break anything). But
here's a rough breakdown of the code that's in:

New Selector Engine (Sizzle: <http://github.com/jeresig/sizzle/tree/master>).
Much faster than previous engine, going to be in many of the major libraries.

No more browser sniffing (currently being discussed here:
[http://www.reddit.com/r/programming/comments/7l2mr/jquery_re...](http://www.reddit.com/r/programming/comments/7l2mr/jquery_removes_all_browser_sniffing/)).

.closest() method - extremely useful for event delegation.

    
    
        // Returns this or closest ancestor that matches selector
        $(this).closest("div");
    

.live() - Super-simple event delegation.

    
    
        // Will handle clicks on all elements that match selector
        // even if new ones are added later
        $("#foo > div").live("click", someFn);
    

.offset() rewrite - significantly faster, uses no browser sniffing.

.hide()/.show() rewrite - 50% - 200% faster.

.append/prepend/before/after rewrite - 10-15x faster.

While the biggest feature of this release is performance, the new event
delegation methods are going to be super-useful.

As to jQuery UI - there are multiple teams within the jQuery project - the
core jQuery team works on the jQuery library and the jQuery UI team works on
jQuery UI. In their last update (about a week ago) the UI team said that UI
1.6 final was going to be out before the end of the month.

~~~
bprater
Yum, I'm glad .live() is in the core.

~~~
jamongkad
How different is .live() from .bind()? does this mean we do not have to
.unbind() and .bind() when we want to create events for dynamically created
DOM elements?

------
gsmaverick
World's best javascript library now gets better.

~~~
bprater
Mmm.. jQuery makes me giddy. This week, I wondered if something akin to jQuery
but running server-side would be useful. (Modifying the DOM before it hits the
client.)

~~~
henryl
<http://aptana.com/jaxer>

~~~
jamongkad
I tried Jaxer but it seems to not follow the usual MVC pattern we all know and
love. I don't know if it supports method chaining goodness ala jQuery though.

~~~
catch23
<http://github.com/choonkeat/hquery/tree/master>

Hquery: Uses pure HTML as "template" for rendering views a Hpricot sequence
(in the .hquery counter-part file) is executed to modify the pure HTML and the
resulting HTML is output to the browser.

------
stanley
Has anyone ever run into issues manipulating table rows or columns? I have on
several occasions experienced problems with cells not being properly displayed
after appending or toggling.

~~~
jeresig
Do you have any examples? Have you filed any bugs in the jQuery bug tracker?
<http://dev.jquery.com/>

~~~
stanley
[http://groups.google.com/group/jquery-
en/search?group=jquery...](http://groups.google.com/group/jquery-
en/search?group=jquery-
en&q=slideDown+for+a+%3Ctr%3E+ignores+the+colspan&qt_g=Search+this+group)

------
mlLK
I'd like a more expansive AJAX API that is capable of handling HTTP headers.

~~~
jeresig
"capable of handling HTTP headers" - can you expand on this a bit?

Right now you can set HTTP headers in jQuery like so:

    
    
        $.ajax({
          beforeSend: function(xhr){
            xhr.setRequestHeader("Accept","application/json");
          },
          ... other options ...
        });
    

More info: <http://docs.jquery.com/Ajax/jQuery.ajax#options>

~~~
ars
I'd like it that if the server sent back Content-type: application/json then
jquery would automatically put it in json, and not require dataType: 'json'.

And it would really be nice if the "simple" ajax functions also allowed doing
something if there was an error.

~~~
mmj
That is a pretty niche feature, I personally wouldn't do something like that.

Check out getResponseHeader() if you are so inclined.

As for the errors, there are many ways to check for "ajax" errors, for one
thing you can check the status or statusText property.

~~~
ars
Niche? I guess you don't use json. jquery already autodetects xml, why not
json too? It's not even hard - it's right in the content type.

I know how to detect errors, that was hardly my point. I was suggesting an
improvement, not tech support.

~~~
mmj
You don't have to eval xml.

~~~
natrius
You don't have to eval JSON.

<http://www.json.org/js.html>

~~~
mmj
<http://www.json.org/json2.js>

// In the third stage we use the eval function to compile the text into a

// JavaScript structure. The '{' operator is subject to a syntactic ambiguity

// in JavaScript: it can begin a block or an object literal. We wrap the text

// in parens to eliminate the ambiguity.

~~~
ars
<http://www.json.org/json_parse.js>

// This is a function that can parse a JSON text, producing a JavaScript

// data structure. It is a simple, recursive descent parser. It does not use

// eval or regular expressions, so it can be used as a model for implementing

// a JSON parser in other languages.

~~~
mmj
Yes, but even better would be to use jQuery's excellent JSONP method.

