jQuery 1.8 BETA – What you need to know

By Sam Deering

jquery 1.8 beta

The jQuery Core Team has been heads-down working on jQuery 1.8, and our first beta release is now available! You can get the code from the jQuery CDN.

View the code

Important Stuff


As of jQuery 1.8, you can build a custom version of jQuery that excludes one or more modules if you do not need their functionality.


jQuery 1.8 eases the pain a bit. We automatically take the non-prefixed property name and generate the prefix that is appropriate for the current browser, so you don’t have to. For example, on Chrome the jQuery call $(“#myscroll”).css(“marquee-direction”, “backwards”) will set the CSS to -webkit-marquee-direction: backwards.


If you need to support older browsers without built-in animations, the new $.Animation provides a solid foundation and fixes many bugs from previous versions.


Sizzle handles many more edge cases and bugs, including improved support for multiple combinators (~ > +) and better detection of browser bugs in querySelectorAll.


jQuery 1.8 introduces a new method: $.parseHTML. It lets you specify strings as HTML and know that they will be parsed as HTML, something that $() cannot do since it also interprets strings as selectors.

// data: string of html
// context (optional): If specified, the fragment will be created in this context, defaults to document
// scripts (optional): If true, will include scripts passed in the html string
parseHTML: function( data, context, scripts ) {

$.browser STILL THERE IN 1.8

$.browser. As of jQuery 1.9 we’ll remove it entirely and you’ll need to use the 1.9 compat plugin.

Discussions about removing it from version 1.9 as it hangs loading of JavaScript. It is still default true;

#11013: Deprecate/remove async option from $.ajax

$.SIZE DEPRECATE The .size() method is functionally equivalent to the .length property; however, the .length property is preferred because it does not have the overhead of a function call. Use .length(). $.size() is an alias to $.length().

#10657: Deprecate/remove jQuery#size() in favor of jQuery#length

Read the official blog post

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

  • Tim Branyen

    I don’t think async; false is gone. It’s still in the source.

    • jQuery4u

      Thanks Tim, I read that wrong it seems it’s still present and is default async = true/async for all AJAX requests except appending multiple scripts it is set to false (see domManip() function async: false,).

  • Dave

    Both async:false and $.fn.size() are still there. The tickets were simply for deprecation.

    • jQuery4u

      Hi Dave, yeah true size() is just an alias for .length.

      // The number of elements contained in the matched element set
      size: function() {
      return this.length;

Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.