Learn Overloading From the jQuery Function
How to do function overloading using the typeof operator

If you worked with jQuery before you may have noticed that the jQuery function is overloaded. It means that when calling the function with different kinds of argument it behaves in different ways.