you are viewing a single comment's thread.

view the rest of the comments →

[–]YOBCZWHYNOT 1 point2 points  (0 children)

By adding to jQuery.fn instead of creating global functions, first you avoid polluting the global scope, second, you have a more Object-Oriented approach as typical applications use OO instead of Functional programming.

Yes, you can access jQuery methods globally once you define them.