It's doing so because your selector is too general: 'select' will find
all select elements on the page. You'll need to specify which select
you want to modify, based on the button clicked (which I can't help
you with without knowing the general layout).

You might also want to consider simply changing the value of the
select, rather than replacing all of the options.

On Mon, Feb 23, 2009 at 7:30 PM, Jsudesign <jus...@jsudesign.com> wrote:
>
> Hi everyone,
>
> I have an add button set up and when you click it it changes the
> selected input from 0 to 1.
> Where my problem is...is that it's doing this for every product.
>
> Here's an example: http://rickyscentralcitymall.com/ordering/tables.html
>
> I would add a new class to each product, but that's going to be a pain
> in the end because there are 100+ items on the menu.
>
> Here's the code I'm working with currently.
>
> $(document).ready(function(){
> $("select").html("<option>0</option><option>1</option><option>2</
> option><option>3</option><option>4</option><option>5</option>");
>        $("tr #button").click(function(){
>                        $("select").html("<option>0</option><option 
> selected='selected'>1</
> option><option>2</option><option>3</option><option>4</
> option><option>5</option>");
>                        return false;
>                        });
>
>  });
>
>
> Any help with this would be great.
>
> Best,
> Justin

Reply via email to