I finally found this solution from “Sven” and solved the problem. what I did was I included “https://stackoverflow.com/questions/10560630/bootstrap.min.js” with:
<script src="https://stackoverflow.com/questions/10560630/bootstrap.min.js"/>
instead of:
<script src="https://stackoverflow.com/questions/10560630/bootstrap.min.js"></script>
and it fixed the problem which looked really odd. can anyone explain why?