jquery mobile学习总结
来源:互联网 发布:java treemap 红黑树 编辑:程序博客网 时间:2024/05/17 20:26
1、更改ul后要使用listview('refresh')刷新视图;
$('ul').append('<li>row</li>').listview('refresh');
2、选取header,并绑定双击事件
$("[data-role='header']").bind('dblclick',function(e){});
3、定时变换背景,长按为taphold
$('#txt').tap(function(){
var elem = this;
$(elem).css('background','yellow');
setTimeout(function(){$(elem).css('background','transparent');},2000);
});
});
4、取消Ajax链接
页面默认为Ajax链接,要把它禁用,有三种方法
A、<a href="second.html" data-ajax="false">Second</a>
B、rel="external"
C、$.mobile.ajaxEnabled=false;
5、图标data-icon类型
home | delete | plus | arrow-u | arrow-d | arrow-r | arrow-l|check | gear | grid | star | custom | minus | refresh | forward | back | alert | info | search
6、Button大小
默认为屏幕同宽,若要变小使用data-inline="true"
7、只有图标的按钮
添加data-iconpos="notext"
$('ul').append('<li>row</li>').listview('refresh');
2、选取header,并绑定双击事件
$("[data-role='header']").bind('dblclick',function(e){});
3、定时变换背景,长按为taphold
$('#txt').tap(function(){
var elem = this;
$(elem).css('background','yellow');
setTimeout(function(){$(elem).css('background','transparent');},2000);
});
});
4、取消Ajax链接
页面默认为Ajax链接,要把它禁用,有三种方法
A、<a href="second.html" data-ajax="false">Second</a>
B、rel="external"
C、$.mobile.ajaxEnabled=false;
5、图标data-icon类型
home | delete | plus | arrow-u | arrow-d | arrow-r | arrow-l|check | gear | grid | star | custom | minus | refresh | forward | back | alert | info | search
6、Button大小
默认为屏幕同宽,若要变小使用data-inline="true"
7、只有图标的按钮
添加data-iconpos="notext"
8、使buttom在header右方
class="ui-btn-right"
9、设置<li class="span">有惊喜,转个不停。
10、固定页面:document.addEvenListener('touchmove',function(e){e.preventDefault();},false);
11、phoneGap中报错ERROR whitelist rejection: url
在PhoneGap.plist里,ExternalHosts加个域名,注意不要协议头,不要路劲和文件名,只要域名(如www.baidu.com)。
12、取消字段截断
button中
.ui-btn-text{
white-space:normal;}
list中
.ui-li-desc{
white-space:normal;}
13、禁用button
$('#home-button').button('disable');
14、去除list中的箭头
<li data-icon="false"><a>row</a></li>
15、设置页面背景颜色
.ui-page{
background:#eee;;}
- jquery mobile学习总结
- bootstrap 和 jQuery mobile学习总结
- Jquery Mobile总结
- Jquery mobile 总结
- jQuery Mobile知识点总结
- jQuery Mobile学习二:jQuery Mobile简介
- 【jQuery Mobile学习】jQuery Mobile简介
- 【jQuery Mobile学习】jQuery Mobile页面(一)
- 【jQuery Mobile学习】jQuery Mobile页面(二)
- 【jQuery Mobile】学习jQuery Mobile 第一弹
- 【jQuery Mobile】学习jQuery Mobile 第二弹
- 【Jquery mobile】基础学习
- jquery mobile 学习
- JQuery Mobile学习笔记
- Jquery mobile学习网站
- jquery mobile学习笔记
- jquery mobile 学习
- jQuery Mobile学习
- 观察者模式
- 好消息!快来围观吧!快来!快来!鬼才部落等着你!
- MIPS下编译QT4.8.0的__tls_get_addr找不到错误
- 伪代码的使用 Usage of Pseudocode
- Concatenated SMS Messages and Character Counts
- jquery mobile学习总结
- 操作系统之进程调度
- 静态库和动态库
- jinja学习笔记
- windows自动运行程序与文件自动传输
- C/C++编程规范
- 201202007链接
- 品味生活,善待人生
- 写单元测试的好处