zepto与jquery还有vue的冲突解决
来源:互联网 发布:win10qq网络不可用 编辑:程序博客网 时间:2024/05/22 02:04
在引用上需要按这个顺序引用
<script src="/beiqi/js/jquery-3.1.1.min.js"></script><script>jQuery.noConflict()</script><script type="text/javascript" src="/beiqi/js/zepto.min.js"></script>如果遇到vue有冲突,需要抛弃vue.js了,哎 也是比较无奈,页面代码这是用ajax硬拼接的页面,如图
jQuery.ajax({ url: juli.URL.deleteclocksql, type: "get", cache: false , data: { "ids":ids, "openid":localStorage.getItem(juli.openIdkey), "deviceId":localStorage.getItem(juli.snkey), "cls":"rm", } }) .done(function (data) { if(data.statue=="SUCCESS"){ el = document.getElementById('htmls'); $(el).html(""); var clocklist=data.list; if(typeof(clocklist)!="undefined"){ for(var i=0;i<clocklist.length;i++){ var htmls=""; htmls+='<section class="list">'+ '<ul class="list-ul">'+ '<li class="list-li">'+ '<div class="con">'+ '<div class="left">'+ '<p>'+clocklist[i].clocktime+'</p>'+ '<p>'+clocklist[i].clocktext+'</p>'+ '</div>'+ '<section class="model-2">'; if(clocklist[i].stat==1){ htmls+='<div class="checkbox">'+ '<input type="checkbox" checked="checked" name="openclock" value="'+clocklist[i].ids+'" onclick="setclock(this)"/>'+ '<label></label>'+ '</div>'; }else{ htmls+='<div class="checkbox">'+ '<input type="checkbox" name="openclock" value="'+clocklist[i].ids+'" onclick="setclock(this)"/>'+ '<label></label>'+ '</div>'; } htmls+='</section>'+ '</div>'+ '<div class="btn">'+ '<input type="button" onclick="deleteclock(this)" ss="'+clocklist[i].ids+'"/>'+ '<input type="button" onclick="bianjiclock(this)" ss="'+clocklist[i].ids+'"/>'+ '</div>'+ '</li>'+ '</ul>'+ '</section>' $(el).append(htmls); } }而且在引用zepto.js是需要初始化的,如图
jQuery(document).ready(function(){ $('.list-li').touchWipe({itemDelete: '.btn'});});在这个页面中 所有的$需要换成jQuery!!!包括引用的js中的$也需要变成jQuery。
0 0
- zepto与jquery还有vue的冲突解决
- zepto与jquery冲突的解决
- jQuery和Zepto冲突问题【解决】
- 解决jQuery和Zepto冲突问题
- jQuery与Zepto的异同
- jQuery与Zepto的异同
- jQuery与Zepto的异同
- jQuery与Zepto的异同
- jQuery与Zepto的异同
- jQuery 与 Zepto 的区别
- jquery与zepto的区别
- 解决UpdatePanel 与 jQuery的冲突
- 解决UpdatePanel 与 jQuery的冲突
- 解决velocity与jquery的冲突
- 如何解决Django与Vue语法的冲突
- jQuery与Zepto
- 【jQuery】jQuery双击事件与单击事件的冲突解决
- jQuery 与prototype冲突解决
- Linux学习之十二bash脚本之变量、变量类型
- Tensorflow多GPU多进程占用的问题
- Windows程序设计学习笔记(四)自绘控件与贴图的实现
- 建设全功能团队
- 简述AJAX
- zepto与jquery还有vue的冲突解决
- VS2013+Windows+CPU下搭建caffe框架并利用mnist数据集实验
- Genymotion模拟器拖入文件报错An error occured while deploying the file
- Annotation-注解初步
- C#MDI打开子窗体去掉自动生成的菜单栏
- Char型变量左移8位赋值给int型变量
- Edraw Office Viewer component教程(一):将Microsoft Word嵌入VB.NET并使之自动化
- 学习总结_STL_map
- 判断手机端登录还是pc端登录