无法让 Trumbowyg 工作。引用错误被捕获
Can´t get Trumbowyg to work. Reference error caught
我正在尝试让 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 是:
Uncaught ReferenceError: $ is not defined at skit3.php:14
感谢所有帮助。
谢谢。
你需要输入:-
<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 库。
我正在尝试让 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 是:
Uncaught ReferenceError: $ is not defined at skit3.php:14
感谢所有帮助。
谢谢。
你需要输入:-
<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 库。