How and what benefit can I take by including Sizzle.js along with jquery1.4.2?

前端 未结 4 1657
抹茶落季
抹茶落季 2021-02-07 04:15

latest jquery 1.4.2 downloaded from jquery.com comes with Sizzle.js also.

How and what benefit can I take from included Sizzle.js?

Is Sizzle.js a standalone lib

4条回答
  •  Happy的楠姐
    2021-02-07 04:42

    OK, it was actually pretty unclear what sizzle.js was to me. Basically, what it does is allows you to use javascript on 'selectors', that is, classes, IDs, DOM elements, etc... So when you use this in jQuery:

    $('div')
    

    That's sizzle.js at work, making that element available to javascript.

    I hope I got that all right :)

提交回复
热议问题