5.22 JLL--实习日志--Js--to be contining
2017-05-22 11:34
323 查看
izimodal no function 的问题
问题描述Uncaught TypeError: $(...).iziModal is not a function at HTMLButtonElement.<anonymous> ((index):1871) at HTMLDocument.dispatch (jquery.js:4618) at HTMLDocument.elemData.handle (jquery.js:4302)
2.Js包的引入
<script type="text/javascript" src="{% static 'assets/js/iziModal-master/js/iziModal.js' %}"></script> <link rel="stylesheet" type="text/css" href="{% static 'assets/js/iziModal-master/css/iziModal.min.css' %}"
3.Js 语法
<script type="text/javascript"> $(document).on('click', '.open-default', function(event) { event.preventDefault() var modal = $('#modals').iziModal(); modal.iziModal('open'); }); </script>
原因:
因为有些js包加载是在所有组件完成以后才生效,izimodal.js 就是这样子的,所以解决的方法就是应该把放在head 里面的izimodal.js 放在html 那边,或者是
相关文章推荐
- 7.22-7.23 JLL实习日志-ManytoMany模型+python中 reload 函数
- 5.28-5.30 JLL--实习日志--js.mask()和bootstrapValidator()验证函数
- 6.22-6.27 JLL--实习日志--Ajax+js 端实现
- 6.12-6.14 JLL--实习日志--filetype-change功能 !+js不工作+js函数嵌套使用
- 6.20 JLL--实习日志-- teneat关联Availabilty,retail 增删改插的函数理解
- 5.27 JLL--实习日志--
- 5.5 JLL 实习日志
- 5.9 JLL实习日志
- toBeContinued h5,bootstrap springboot pythonflask nodejs
- 6.15 JLL--实习日志--SetupNewWorkSpace on cloud9
- 5.23 JLL--实习日志--PropertyExtension和string_float问题
- 5.26 JLL--实习日志--Primary_Image+total_setting
- linux 下安装node.js 报You need to be root to perform this command
- using JS to control two select(html),the data can be loaded from database and XML,and show in the select
- 6.5 JLL--实习日志--改变数据库结构update+修改下拉框
- 6.7-6.9 JLL--实习日志--googleAPI+Heat Map+update修改
- js闭包个人理解--to be continued
- org.apache.struts.taglib.html.MessagesTei cannot be cast to javax.servlet.js
- 5.4 JLL 实习日志 –form 表单问题
- 5.10 JLL实习日志-实现upload 功能实现