javascript - jQuery - hide an element inside bootstrap modal -
i trying hide button (assume buttona) inside bootstrap modal popup. here have buttonb , buttonc @ different places , both used trigger same popup problem have hide buttona when popup triggered buttonb , show when triggered buttonc.
i tried below generic code in jquery not working me, there way make happen while using bootstrap modal popup.
$('#buttonb').click(function() {    alert('test');    $('#buttona').hide();  });
if #buttonb dynamically created element use jquery's .on() function in following format: $(staticancestors).on(eventname, dynamicchild, function() {});
staticancestors closest parent element static.
$(staticancestors).on('click', '#buttonb', function() {   alert('test');   $('#buttona').hide(); }); 
Comments
Post a Comment