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"
加载中,请稍侯......
精彩评论