set data id javascript

Solutions on MaxInterview for set data id javascript by the best coders in the world

showing results for - "set data id javascript"
Benjamin
03 Oct 2016
1var d = document.getElementById("test");  //   Javascript
2d.setAttribute('data-id' , 'Next');       //
3
Adalyn
28 Nov 2016
1 $('#test').attr('data-id' , 'Next');   // JQuery
2