I found these sample code from here
The code is like this:
<script>
$("#modal2Button").click(function() {
$("#modal1").fadeOut();
setTimeout(function() {
$("#modal2").fadeIn();
}, 400)
});
$("#close-button").click(function() {
setTimeout(function() {
$("#modal1").fadeIn();
$("#modal2").fadeOut();
}, 1000)
});
</script>
When I paste the jQuery as a separate file and link it inside the <head>
<head>
<script src="sample_code.js"></script>
</head>
and for some reason that does not work?
Any help will be much appreciate!