Reputation: 101
Hello I am making a button and for some reason when I click on it I does not open Projects.php, and I can not find out why it does not work here is my code:
<h1>Projects</h1>
<p> Some text</p>
<button type="button" class="btn btn-default" href="Projects.php">View details »</button>
I have the following libraries linked:
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
I download the bootstrap file from the bootstrap site and put the folders in my directory. My file is saved as index.php (because php code is my file)
Any help is appreciated!
Upvotes: 2
Views: 27647
Reputation: 3
If you are using bootstrap 3.1.1 then in your script at the bottom, you should import jquery v1.11.0 instead of v1.11.2
Upvotes: 0
Reputation: 61114
Buttons don't act as links unless they're in a form (more on that). I don't think you want the behavior of a button anyway. Do this:
<a class="btn btn-default" href="Projects.php">View details »</a>
Upvotes: 7