javascript - Element value set by modal button action is not working in jquery? -
my code jquery is: (this trigger on modal button click)
$(document).on('click', '.js-modal-remove-button', function () { $('#code-output').attr('da-url',"1111"); });
my code html is:
<input type="hidden" name="problemcode" id="code-output" da-url=2/>
problem there button in page, on button click modal opens , in modal there button contains class js-modal-remove-button
on action of need set main page(on modal opening button present) da-url value
just , class button , use jquery
html
<button class="js-modal-remove-button model_button_class"></button>
jquery
$(document).on('click', '.js-modal-remove-button .model_button_class', function () { $('#code-output').attr('da-url',"1111"); });
here .model_button_class
class .
thing you.
Comments
Post a Comment