$ .jAlert不是函数

时间:2019-03-10 05:59:56

标签: javascript jquery css

尝试后,jquery确认,现在是jAlert,我每次都遇到相同的错误。 在控制台中,我得到-TypeError:$ .jAlert不是函数[了解更多]

<script src="js/jquery-3.3.1.min.js"></script>
<link href="css/jAlert.css" rel="stylesheet">
<script src="js/jAlert.js"></script>
<script src="js/jAlert-functions.js"></script>

我的按钮是...

<input type="radio" class="form-check-input" name="optionsRadios" id="mybtn" value="">

脚本部分:

<script type="text/javascript">  
$(document).ready(function(){
$('#mybtn').on('click',function(){
    $.jAlert({
      'title': 'Nice Size',
      'content': 'This is the sized alert',
       'theme':'blue',
      'closeOnClick': true 
   });
});
</script>

我猜jQuery和jAlert有冲突... 有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

如何将扩展的jquery功能与fn一起使用,以便您的代码得以实现

<script type="text/javascript">  
$(document).ready(function(){
   $('#mybtn').on('click',function(){
      $.fn.jAlert({
      'title': 'Nice Size',
      'content': 'This is the sized alert',
      'theme':'blue',
      'closeOnClick': true 
   });
});
</script>