我在JavaScript中运行方法$('.selectpicker').selectpicker()
,我收到以下错误:
$(...)。selectpicker不是函数
我已正确包含
我做错了什么?
PLUGINS是常量php;
<?php define('PLUGINS', 'http://' . $_SERVER['HTTP_HOST'] . '/plugins/' );?>
<script type="text/javascript" src="<?= PLUGINS . 'jquery/jquery-2.1.4.min.js' ?>"></script>
<script type="text/javascript" src="<?= PLUGINS . 'bootstrap/js/bootstrap.js' ?>"></script>
<script type="text/javascript" src="<?= PLUGINS . 'bootstrap-select/dist/js/bootstrap-select.js' ?>"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.selectpicker').selectpicker();
})
</script>