Js.live method Invalid, error: uncaught TypeError: $ (...). Live is not a function

Source: Internet
Author: User

The previous time in the online copy of a JS effect, you need to refer to jquery 1.9.1.min.js, the previous project was referring to the jquery 1.5.1.min.js

And then found that some dynamically generated elements in the code useful to live methods are all invalid, debugging found JS error: uncaught TypeError: $ (...). Live is not a function

Online A check originally is Query 1.9 than the previous version made a lot of adjustments, many functions are not supported

The live () method has been invalidated and needs to be changed to the following mode

$ (' #id '). On ("click", Function () {
Alert ("Www.51byl.net"); Alert ("I want to graduate essay Net");

});

Change to the following:

$ (document). On ("click", "#id", function () {
Alert ("www.bqlww.com"); Alert ("The paper network of the North Qing");

});

Small ads, thank you for your support

"The paper net of the North Qing Dynasty" "I want to graduate thesis net"

Js.live method Invalid, error: uncaught TypeError: $ (...). Live is not a function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.