为什么我的bootstrap工具提示不起作用?

时间:2023-01-09 22:29:35

I have been trying, but I simply cannot find out why my bootstrap tooltips won't work. This is my entire file http://pastie.org/5399296 And here is the link to the page http://pages.nbscraft.net/bootstrap/DonatePage.html But I just cannot get the tooltips to work.

我一直在努力,但我根本无法找出为什么我的bootstrap工具提示不起作用。这是我的整个文件http://pastie.org/5399296这里是http://pages.nbscraft.net/bootstrap/DonatePage.html页面的链接但我无法让工具提示工作。

1 个解决方案

#1


1  

You're using $ before you include jQuery.

你在包含jQuery之前使用$。

Move the following section

移动以下部分

<!-- Scripts -->
<script type="text/javascript">
$(document).ready(function() {
  $('.tip').tooltip();
});
</script>

to the end of the page:

到页面末尾:

<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>

<!-- Scripts -->
<script type="text/javascript">
$(document).ready(function() {
  $('.tip').tooltip();
});
</script>

btw, it's always a good practice to put all JS at the end of a page.

顺便说一句,将所有JS放在页面末尾始终是一个好习惯。

#1


1  

You're using $ before you include jQuery.

你在包含jQuery之前使用$。

Move the following section

移动以下部分

<!-- Scripts -->
<script type="text/javascript">
$(document).ready(function() {
  $('.tip').tooltip();
});
</script>

to the end of the page:

到页面末尾:

<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>

<!-- Scripts -->
<script type="text/javascript">
$(document).ready(function() {
  $('.tip').tooltip();
});
</script>

btw, it's always a good practice to put all JS at the end of a page.

顺便说一句,将所有JS放在页面末尾始终是一个好习惯。