Sunday, May 12, 2024
11
rated 0 times [  15] [ 4]  / answers: 1 / hits: 17220  / 12 Years ago, mon, april 23, 2012, 12:00:00

I call the js files for bootstrap twitter library but I get the error that indicates



$(a[rel=popover]).popover is not a function


.



<script src=../../jq/jquery-1.7.1.min.js type=text/javascript></script>
<script src=../../bootstrap/js/bootstrap.js type=text/javascript></script>
<script src=../../bootstrap/js/bootstrap-tooltip.js type=text/javascript></script>
<script src=../../bootstrap/js/bootstrap-popover.js type=text/javascript></script>

<script type=text/javascript>
$(document).ready(function () {

// second supervisor popover
$('a[rel=popover]').popover({
placement: 'below',
offset: 20,
trigger: 'manual'
});
});


</script>

More From » twitter-bootstrap

 Answers
26

This works:



http://jsfiddle.net/9W53Q/7/



Edit: http://jsfiddle.net/9W53Q/272/



Make sure the resoures are being added in the right order (tooltip first).
Or like Richard Dalton suggested (and I recommend), just use the compiled bootstrap.js file.



$(document).ready(function() {
$('a[rel=popover]').popover();
});

[#86051] Saturday, April 21, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bradford

Total Points: 709
Total Questions: 117
Total Answers: 91

Location: Sao Tome and Principe
Member since Wed, Dec 21, 2022
1 Year ago
;