Karl is right, you need to convert it from a string first.

shapper wrote:
> Hello,
>
> I have an input on my page as follows:
>
>   <input id="Index" name="Index" type="hidden" value="0" />
>
> I am trying to increase and decrease the value of the input as
> follows:
>
>         $index = $('#Index');
>         $index.val()--;
>
> I always get an error:
> invalid assignment left-hand side
>
> What am I doing wrong?
>
> Thanks,
> Miguel

Reply via email to