Reputation: 33
I've looked around and haven't been able to find anyone with an issue quite like mine.
I've also had a few people inspect my javascript/html for obvious bugs, and have squashed a few of them.
I'm trying to implement a simple javascript popover using twitter bootstrap, as shown here.
As far as I can tell, my code (here) for a button with a popover is identical to their example code (excluding the content itself), and yet it does nothing.
The button that says "Creative" on my page should have a popover similar to twitter bootstrap's example "Hover for popover" demo button.
Edit: The link to my code no longer shows the problem I was having. However, the issue was that I included the javascript source in the header as type="javascript" instead of type="text/javascript".
Upvotes: 3
Views: 9073
Reputation: 529
Modify the code of the page L138-L146:
$(document).ready(function() {
$("a[rel=popover]")
.popover({
offset: 10
})
.click(function(e) {
e.preventDefault()
})
});
UPDATE
O.o
The type of script tag is text/javascript
. It's like:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Upvotes: 7