When MUST I use ; to indicate the end of the JS statement in jQuery?
Hello all,
For the following two snippets, they can all pass Firefox.
However, I would like to know the rule of thumb when I have to use ; to indicate the end of
JS statements.
Thank you
(function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text') .attr('readonly',readonly); } })(jQuery); ///////////////////////////////////
(function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text') .attr('readonly',readonly); }; })(jQuery);