开发者

object.jquery attribute

what does this code performs?

if(object.jquery){
  ....
}

I don't know what jQue开发者_Python百科ry attribute does. I think it checks if 'object' is a valid jQuery object, but I'm not really sure.

Thanks in advance.

Esteve


It's checking if object has a property called jquery, so yes it's checking if object is specifically a jquery object :)

It's not checking if it's been loaded (try it on this very page), that would be if(window.jQuery), but jquery objects have a property called jquery which is the version, for example:

$().jquery //on this page, as of now (when answered): "1.3.2"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜