调用方法时$('selector')。methodname()和$ .methodname()之间的区别 [英] Difference between $('selector').methodname() and $.methodname() while calling method

查看:94
本文介绍了调用方法时$('selector')。methodname()和$ .methodname()之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,

Generally, in jquery we use syntax like $('selector').methodname() to call any method. But sometimes I have seen jquery scripts where they use $.methodname directly without any selector in brackets following dollar sign i.e. $('selector').methodname()

Please state the difference between $('selector').methodname() vs $.methodname() while calling method.





我尝试过:



请在调用方法时说明$('selector')。methodname()vs $ .methodname()之间的区别。



What I have tried:

Please state the difference between $('selector').methodname() vs $.methodname() while calling method.

推荐答案

('selector')。methodname()调用任何方法。但有时我看过jquery脚本,他们直接使用
('selector').methodname() to call any method. But sometimes I have seen jquery scripts where they use


.methodname而没有任何选择器在美元符号后面的括号中,即
.methodname directly without any selector in brackets following dollar sign i.e.


('selector')。 methodname()

请说明
('selector').methodname() Please state the difference between


这篇关于调用方法时$('selector')。methodname()和$ .methodname()之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆