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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -