Page 1 of 1

get element.id and set element.id

Posted: Fri Apr 03, 2015 12:27 pm
by EJLD

Hi There,
I'd like to get/give an id name of/to a button (part of a listItem).
I used the snippet:

var myVar = element.id;
element.id = 'newId';

but doesn't work.
any idea ?
many thks in advance
Eric


get element.id and set element.id

Posted: Fri Apr 03, 2015 1:43 pm
by Egor Kotov6832188

Hello Eric,

http://gyazo.com/cb7748f4d1a0239cca75... here is an example.


get element.id and set element.id

Posted: Fri Apr 03, 2015 1:48 pm
by EJLD

Thks Egor, i'll check it out soon.