How to change the id
of the div
using jquery?
I have div
with id
(initially as 'first') and a dropdown (with values 'first', 'second').
On changing the dropdown value, i need to change the id of the div
according to dropdown value.
It is simple:
$('#first').attr('id', 'second');
Add it to your onchange function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With