(李南江jQuery+Ajax)第一章:初识jQuery


第一章:初识jQuery

一、原生的JS与jQuery的区别




    
    03-jQuery和JS入口函数的区别
    
    




 二、jQuery入口函数的4种写法

    // 第1种写法:
    $(document).ready(function () {
        alert("hello jquery1")
    })
    // 第2种写法:
    jQuery(document).ready(function () {
        alert("hello jquery2")
    })
    // 第3种写法:(推荐)
    $(function () {
        alert("hello jquery3")
    })
    // 第4种写法:
    jQuery(function () {
        alert("hello jquery4")
    })

三、jQuery的冲突问题

问题描述:jQuery使用 $ 符号来作为选择器,如果其他的框架也通用使用 $ 符号,两者产生冲突,后面引入的框架会覆盖掉前面的

    
        //自定义的一个框架也使用了 $