tags:

views:

40

answers:

2
$(".number_changer").attr("id")="two";

I am trying to grab the class number_changer and set the id on it to "two"

invalid assignment left-hand side
$(".number_changer").attr("id")="two"; 
+3  A: 
$(".number_changer").attr("id", "two");

More here:
http://api.jquery.com/attr/

Nikita Rybak
I will hope, for my sake, that we never have to duel.
Greg
@Greg I'll write a program which takes a picture of you every 0.1 second, determines if you moved your hand and shoots you automatically :)
Nikita Rybak
+2  A: 
$(".number_changer").attr('id', 'two');

See jquery documentation:

http://api.jquery.com/attr/

Greg