0
我試圖在Cakephp2的ctp文件中添加flex選擇,並得到以下錯誤。我將如何解決這個問題?我搜索了一下,並嘗試,但沒有解決方案,幫助。我很想聽到你的消息!由於錯誤,無法在cakephp2中實現一個庫(flexselect)
Uncaught TypeError: $(...).flexselect is not a function
at HTMLDocument.<anonymous> ((index):557)
at c (jquery-1.9.1.min.js:3)
at Object.fireWith [as resolveWith] (jquery-1.9.1.min.js:3)
at Function.ready (jquery-1.9.1.min.js:3)
at HTMLDocument.H (jquery-1.9.1.min.js:3)
索引行557引用下面的代碼。
<script>
$(document).ready(function() {
$("select.special-flexselect").flexselect({ hideDropdownOnEmptyInput: true });
$("select.flexselect").flexselect();
});
</script>
您需要在您的頁面中包含具有'flexselect'插件的JS文件。如果您檢查插件的主頁,它甚至會顯示如何:http://rmm5t.github.io/jquery-flexselect/ –