'this' is standard JavaScript for an object referring to itself

'$(this)' is jquery for 'the current object' or similar

You can't call jQuery methods on standard JavaScript objects, only on
jQuery objects

On Jun 26, 2:02 pm, x-herbert <[EMAIL PROTECTED]> wrote:
> Hi jQueries;
>
> what is the different between this and $(this) ??
>
> I try the follow lines
>
> $("#form_zuw input[readonly]").each(function() {
>         this.addClass("input_readonly");
>
> });
>
> likehttp://jquery.bassistance.de/jquery-getting-started.html
>
> $(document).ready(function() {
>         // use this to reset several forms at once
>         $("#reset").click(function() {
>                 $("form").each(function() {
>                         this.reset();
>                 });
>         });
>
> });
>
> and Firebug say "addClass is not a Function"...???
>
> and this is running
>
> $("#form_zuw input[readonly]").each(function() {
>         $(this).addClass("input_readonly");
>
> });
>
> Can you explain the different?
>
> Thanks
> x-herbert

Reply via email to