jquery Live function syntax
jquery version update, found a problem: JQ comes with live no more.
The following prompts are available under the console:
Firefox: TypeError: $ (...). Live is not a function
Chrome:uncaught Typeerror:object [Object Object] has no method ' live '
A statement on the Internet:
JQuery 1.9 has made a lot of adjustments compared to previous versions, and many functions are not supported.
For example, Live (), die (), toggle (), sub (), $.browser, and so on have been removed and the full update is shown in http://jquery.com/upgrade-guide/1.9/(English).
Without changing your site code, you will need to use jQuery Migrate (transfer, over) to use the version after 1.9, see http://blog.jquery.com/2013/01/31/ jquery-migrate-1-1-0-released/(English).
The Migrate should only be temporary. To stay in sync with jQuery, it is recommended that you rewrite all of your site's code from now on with 1.9 changes.
So before your code if it's
$ ("#ele"). Live ("Click", Function () {
//...
});
Now to write
$ ("#ele"). On ("click", Function () {
//...
});
Dynamically generated elements to use live, to be written as
$ (document). On ("click", "#ele", function () {
//...
});
There is no processing of the live function after the jquery version is updated. TypeError: $ (...). Live is not a function