Here is an example of a function that is followed by the jQuery function:
<script>
(function ($)
{
$('a').mouseenter(
function () { alert(this.id); });
})(jQuery);
</script>
I have done tons of searches and been reading through jQuery Succinctly, but I'm really struggling to understand what passing in the $
sign or following the function with (jQuery)
does. Could anyone clarify this for me?
Bonus question: does this have anything to do with extending a jQuery method? I am looking into trying to extend the .html()
method.