Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

APIs and features removed from jQuery core

tag: 0.1.1b1

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 build
Octocat-spinner-32 libs Update to QUnit 10.0
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore Initial commit
Octocat-spinner-32 .jshintrc
Octocat-spinner-32 LICENSE-MIT
Octocat-spinner-32 grunt.js
Octocat-spinner-32 package.json

jquery-compat: Restore deprecated features for jQuery 1.9+

This project can be used to detect and restore APIs, features or functionality that have been deprecated in jQuery and removed as of version 1.9. They include:

  • jQuery.browser docs
  • jQuery.fn.andSelf() docs
  • jQuery.sub() docs
  • jQuery.fn.toggle() docs (event click signature only)
  • "hover" pseudo-event name docs
  • jQuery.fn.error() docs
  • ajaxStart, ajaxSend, ajaxSuccess, ajaxError, ajaxComplete, ajaxStop global events on non-document targets docs
  • Use of attrChange, attrName, relatedNode, srcElement on the Event object (use Event.originalEvent.attrChange etc. instead)
  • jQuery.fn.attr() using the pass argument (undocumented)
  • jQuery.attrFn object (undocumented)
  • data events (undocumented)
  •"events") to retrieve event-related data (undocumented)

See the warnings page for more information regarding messages the plugin generates.

In your web page, make sure to load this plugin after the script for jQuery:

<script src=""></script>
<script src=""></script>

The plugin can be included with versions of jQuery as old as 1.6.4 as a migration tool to identify potential upgrade issues. However, the plugin is only required for version 1.9 or higher to restore deprecated and removed functionality.

Development vs. Production versions

To make it easier for jQuery developers to find and remove deprecated functionality, the development version of the plugin displays warnings on the browser's console. In browsers that don't support the console interface such as IE7, no messages are generated unless you include a debugging library such as Firebug Lite before including the jQuery Compat plugin. Developers can also inspect the jQuery.compatWarnings array to see what error messages have been generated.

All warnings generated by this plugin start with the string "JQCOMPAT". A list of the warnings you may see are in

Development version

This version provides console warning messages when deprecated and/or removed APIs are used. Use this version during development and debugging, and whenever you are reporting bugs to the jQuery team.

Latest released development version: This file is hosted on jQuery's CDN, and can be hotlinked if desired.

Current work-in-progress build: Although this file represents the most recent updates to the plugin, it may not have been thorougly tested.

Production version

The minified production file is compressed and does not generate console warnings. Do not use this file for development or debugging, it will make your life miserable.

Latest released production version: This file is hosted on jQuery's CDN, and can be hotlinked if desired.

Current work-in-progress build: Although this file represents the most recent updates to the plugin, it may not have been thorougly tested. We do not recommend using this file on production sites since it may be unstable; use the released production version above.

Compat Plugin API

This plugin adds two properties to the jQuery object that can be used programmatically control and examine its behavior:

jQuery.compatWarnings: This property is an array of string warning messages that have been generated by the code on the page, in the order they were generated. Messages appear in the array only once, even if the condition has occurred multiple times, unless jQuery.compatReset() is called.

jQuery.compatReset(): This method clears the jQuery.compatWarnings array and "forgets" the list of messages that have been seen already.

Reporting problems

Any bugs should be reported on the jQuery Core bug tracker and must be accompanied by an executable test case that demonstrates the bug. The easiest way to do this is via an online test tool such as or You can this this jsFiddle template or this jsbin template as a starting point; they already contain links to the work-in-progress versions of both jQuery and the jQuery Compat plugin. Add your code there and post a link to it with your bug report.

How to run the tests:

Clone this repo, install grunt:

git clone git://
cd jquery-browser
npm install -g grunt

Run grunt to lint, test and min release.

Something went wrong with that request. Please try again.