How to deactivate default bootstrap modal

Hi Campers ,
This is Mohammad Mizanur Rahman a new member for freeCodeCamp forum. I’m developing a Photo gallery Web Application with PHP & MySQL . In front end design part ( menu-option ) I’m facing a problem with default bootstrap modal , I would like to run the modal pop up form by my own script which I coded with javaScript . Please check below :

<!-- Script For Sign Up Form -->
	var modal2 = document.getElementById('myModal2');
	var btn2 = document.getElementById("myBtn2");
	var span2 = document.getElementsByClassName("close2")[0];
		btn2.onclick = function() { = "block"; = "none";

		span2.onclick = function() { = "none";

		window.onclick = function(event) {
			if ( == modal2) { = "none";

Actually after closing this form when I clicked on window that time the default “modal-backdrop” class is not working .

Website URL

Why are you not using the built-in modal methods?


I tried by using this before posting my topics and I’m trying again

Thank you