javascript - Jquery .show button won't work -
i have jquery function removes content , toggles button on twitter bootstrap , after button toggles, if click it's suppose go removes content, it's not working. please help. thank you!
$('#btnadd').click(function () { $(".removesettings").remove(); $(this).toggleclass('displaying'); $('#removedcontent').show(); }); $('#removedcontent').click(function () { $('#removedcontent').remove(); $(".removesettings").show(); });
you removing elements, cannot show them if removed.
replace remove()
's hide()
s instead.
$('#btnadd').click(function () { $(".removesettings").hide(); $(this).toggleclass('displaying'); $('#removedcontent').show(); }); $('#removedcontent').click(function () { $('#removedcontent').hide(); $(".removesettings").show(); });
Comments
Post a Comment