Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
529 views
in Technique[技术] by (71.8m points)

javascript - 如何修复错误; '错误:Bootstrap工具提示需要Tether(http://github.hubspot.com/tether/)'(How to fix the error; 'Error: Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)')

I'm using Bootstrap V4 and the following error is logged in the console;

(我正在使用Bootstrap V4,并在控制台中记录以下错误;)

Error: Bootstrap tooltips require Tether ( http://github.hubspot.com/tether/ )

(错误:Bootstrap工具提示需要Tether( http://github.hubspot.com/tether/ ))

I have tried to remove the error by installing Tether but it hasn't worked.

(我试图通过安装Tether删除错误,但它没有奏效。)

I have 'installed' Tether by including the following lines of code;

(我通过包含以下代码行“安装”了Tether;)

<link rel="stylesheet" href="http://www.atlasestateagents.co.uk/css/tether.min.css">
<script src="http://www.atlasestateagents.co.uk/javascript/tether.min.js"></script>

Have I 'installed' tether correctly?

(我是否正确安装了系绳?)

Can anyone help me remove this error?

(任何人都可以帮我删除此错误?)

If you wish to view the error on my site, please click here and load your console.

(如果您希望在我的网站上查看错误,请单击此处并加载您的控制台。)

  ask by Michael LB translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For Bootstrap 4 stable:(对于Bootstrap 4稳定:)

Since beta Bootstrap 4 doesn't depend on Tether but Popper.js .

(因为beta Bootstrap 4不依赖于Tether而是依赖于Popper.js 。)

All scripts ( must be in this order):

(所有脚本( 必须按此顺序):)

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

See the current documentation for the newest script versions.

(有关最新脚本版本,请参阅当前文档 。)


Only Bootstrap 4 alpha:(只有Bootstrap 4 alpha:)

Bootstrap 4 alpha needs Tether , so you need to include tether.min.js before you include bootstrap.min.js , eg.

(Bootstrap 4 alpha需要Tether ,因此包含bootstrap.min.js 之前需要包含tether.min.js 。)

<script src="https://npmcdn.com/[email protected]/dist/js/tether.min.js"></script>
<script src="https://npmcdn.com/[email protected]/dist/js/bootstrap.min.js"></script>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...