Home >Web Front-end >Front-end Q&A >Does live jquery not support it?

Does live jquery not support it?

藏色散人
藏色散人Original
2021-01-11 10:02:132179browse

jquery does not support live; because the live method is no longer recommended in jquery1.7, and the live method has been deleted in jquery1.9, and it is recommended to use the on method in future codes. substitute.

Does live jquery not support it?

The operating environment of this tutorial: windows7 system, jquery1.7&&jquery1.9 version, Dell G3 computer.

Recommended: jQuery video tutorial

Is the live() method not supported by jquery?

According to the official description of jQuery, the live method is no longer recommended in 1.7, and this method was deleted in 1.9; it is recommended to use the on method instead in future codes.

Previous live methods such as:

$("#con_imgs").live('change',function(){
       v = $(this).val();
       $("input[name='contentimg']").val(v);
 });

After jquery1.10, on can be used instead of live

$("#con_imgs").on('change',function(){
         v = $(this).val();
        $("input[name='contentimg']").val(v);
});

The above is the detailed content of Does live jquery not support it?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn