What does $.fn mean in jQuery?
The $.fn
statement
In jQuery, there are some code like below:
$.fn.something = function{}
What does the $.fn
mean in jQuery?
Answer
The $.fn
is an alias for jQuery.prototype
which allows you to extend jQuery with your own functions.
$.fn.something = function{}
will allow you to use
$("#element").something()
The $.fn
is also synonymous with jQuery.fn
.
References & Resources
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync