I am trying to detect if a jQuery plugin is available, I tried
$.pluginName
but failed then tried
$().pluginName
it works. But whats the difference between the 2?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be looking at
$.fn.pluginName. jQuery’s$.fnis an alias for$.prototypeand that’s where all the plugin names go. The top-level$.*namespace is reserved for jQuery’s utility functions such as$.each()and$.grep().