Skip to content
Advertisement

How to change html attribute value with jquery

I have select tag of HTML I want to change /id/ with help jquery in data-ajax--url attribute

JavaScript

Advertisement

Answer

Like this

NOTE Your attribute name is invalid.

JavaScript
JavaScript

If you change the -- to an underscore, you could do this in plain JS

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement