I agree.  The overloading does make the methods inscrutable (at least
for a beginner).

JAS

On Feb 3, 5:50 am, RobG <rg...@iinet.net.au> wrote:
> On Feb 3, 7:25 am, "Michael Geary" <m...@mg.to> wrote:
>
> > That didn't work because .html is a method, not a property you can set.
>
> Not exactly - the issue is that the OP is assigning a value to the
> jQuery.html property instead of calling the function referenced by it
> and passing the value as an argument.
>
> This is one of the gottchas of overloading of methods - instead of
> getHTML() and setHTML('...') methods which clearly indicate how they
> shoudl be used, the one method is used for both and the programmer has
> to work out what was intended from the context, not the method name.
>
> --
> Rob

Reply via email to