我正在尝试让Trumbowyg (https://alex-d.github.io/Trumbowyg/)工作,下面是我要运行的代码:
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//cdn.rawgit.com/Alex-D/Trumbowyg/v2.5.1/dist/ui/trumbowyg.min.css">
<link rel="stylesheet" href="//cdn.rawgit.com/Alex-D/Trumbowyg/v2.5.1/dist/plugins/colors/ui/trumbowyg.colors.min.css">
<script src="//cdn.rawgit.com/Alex-D/Trumbowyg/v2.5.1/dist/trumbowyg.min.js"></script>
</head>
<body>
<textarea id="hello" name="hello"></textarea>
<script>
$(document).ready(function(){
$('#hello').trumbowyg();
});
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</body>
</html>也不起作用。我现在真的很擅长Jquery:
google控制台引发的错误是:
未定义的ReferenceError:$未在skit3.php:14处定义
所有的帮助都是感激的。
谢谢。
发布于 2017-05-31 22:47:43
你得把:-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>在此之上:
<script src="//cdn.rawgit.com/Alex-D/Trumbowyg/v2.5.1/dist/trumbowyg.min.js"></script>改变这个,它就会起作用。
注意:每当您要使用任何第三方js库或您自己的脚本代码时,都需要在jquery库之前添加jquery库。
https://stackoverflow.com/questions/44295610
复制相似问题