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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -