首页 > 其他分享 >jquery mobile的一些使用记录。

jquery mobile的一些使用记录。

时间:2023-06-04 16:37:05浏览次数:76  
标签:jquery http 记录 mobile 对话框 refresh url color red




[color=red][b]自定义按钮图标去除按钮阴影/圆角[/b][/color]
[url]http://bbs.phonegap100.com/thread-218-1-1.html[/url]

[color=red][b]jQuery Mobile 自定义按钮图标[/b][/color]
Jquery Mobile 自定义按钮图标 [url]http://liningjustsoso.iteye.com/blog/1986769[/url]

[color=red][b]phonegap 3.5 使用自带浏览器打开链接 [/b][/color]
安装org.apache.cordova.inappbrowser插件后使用

window.open( ad_path, '_blank', 'location=yes');


[url]http://www.qdkf.net/18.html[/url]



[color=red][b]cordova使用JQM的pageinit事件[/b][/color]


app.initialize();
---->
initialize: function () {
        this.bindEvents();
    }
----->
bindEvents: function () {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },
----->
onDeviceReady: function () {
        app.receivedEvent('deviceready');
    }
----->
receivedEvent: function (id) {
        $(document).bind("pageinit", function(){
            app.alert($("div[data-role=footer]").length);
        });
    }




jQuery Mobile 的[color=red][b]延迟加载[/b][/color]控件 - jQuery.mobile.lazyloader


[url]http://www.open-open.com/lib/view/open1337905968996.html[/url]




[color=red][b]默认选中导航[/b][/color]


class="ui-btn-active ui-state-persist",在导航加上这个样式



[color=red][b]changePage() 页面跳转[/b][/color]


[url]http://www.lampweb.org/jquerymobile/5/11.html[/url]


[url]http://blessht.iteye.com/blog/2038914[/url]




[color=red][b]jquery mobile 在代码如何打开一个对话框? [/b][/color]


页面隐藏一个:


<a href="#Msg" id="ShowMsg'" data-rel="dialog" data-transition="flip"></a>


要打开的时候,就动态 $('#ShowMsg')click();



[color=red][b]关闭对话框 Closing dialogs[/b][/color]


A: 对话框内的任何链接被点击时,Jquery Mobile会自动关闭对话框,用回退效果转场到指向该对话框的页面。要在对话框内创建一个取消"按钮,只需要把该链接的herf指向打开该对话框的按钮然后给链接加上data-rel="back"属性。这样制作的后退链接在不支持js的设备上也同样管用。


B: $( "#dialog_login_link" ).dialog( "close" );



[color=red][b]使用 jQuery Mobile 与 HTML5 开发 Web App —— HTML5 Web Storage [/b][/color][url]http://kayosite.com/web-app-by-jquery-mobile-and-html5-web-storage.html[/url]



[color=red][b]JQueryMobile页面跳转参数的传递解决方案 [/b][/color][url]http://topmanopensource.iteye.com/blog/1532476[/url]



下载Latest stable版本,把images和css文件放到同一路径。


引入:

[color=darkblue]<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css"/>

<link rel="stylesheet" type="text/css" href="css/jquery.mobile.theme-1.4.5.min.css"/>

<link rel="stylesheet" type="text/css" href="css/jquery.mobile.icons-1.4.5.min.css"/>

<link rel="stylesheet" type="text/css" href="css/jquery.mobile.structure-1.4.5.min.css"/>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>[/color]


[color=red][b]JQuery Mobile 手机显示页面偏小[/b] [/color][url]


在页面head中少了一句话


[color=darkblue]<meta name="viewport" content="width=device-width, initial-scale=1" />[/color]


例子里面是


<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, initial-scale=1, height=device-height, target-densitydpi=device-dpi"/>,这个[color=red]target-densitydpi=device-dpi[/color]会影响的。 这个属性参考:[urlicle/details/9414599[/url]


[color=red][b]jquerymobile header导航和footer底部固定[/b][/color], [ur ,增加data-position="fixed" data-tap-toggle="false"即可。



[color=red][b]动态添加控件[/b][/color],jQuery Mobile 动态 添加按钮


有些对象提供了refresh 方法,如listview、flip toggle。[color=red]与create的区别是refresh方法需要作用在已存在的对象上[/color],如 $('ul').listview('refresh'),而且refresh只会去更新新加入的元素,如listview里最新append的元素会更新,原有的保持不变。


[b]1. create方法:[/b]


如果要使动态插入的元素具有jqm的样式,可以对jqm对象触发create事件


$(selector).trigger('create');


或者


$('<a data-role="button">dy button</a>').appendTo('#content').trigger('create');

[b]2. refresh方法[/b]


添加一个<input type='button' value='OK' id="btn_OK"/>然后调用jquery mobile 方法:$('#btn_OK').button();


jquery 表单元素每一个元素都有自己刷新的方法,每当改变它们的属性以后,都要执行这些方法,以下是实例:


复选按钮

$("input[type='checkbox']").attr("checked",true).checkboxradio("refresh");


单选按钮组:


$("input[type='radio']").attr("checked",true).checkboxradio("refresh");


选择列表::

var myselect = $("select#foo");

myselect[0].selectedIndex = 3;

myselect.selectmenu("refresh");

滑动条


$("input[type=range]").val(60).slider("refresh");

开关 (they use slider):

var myswitch = $("select#bar");

myswitch[0].selectedIndex = 1;

myswitch .slider("refresh");


标签:jquery,http,记录,mobile,对话框,refresh,url,color,red
From: https://blog.51cto.com/u_3871599/6410939

相关文章

  • 高效的jQuery代码编写技巧大盘点
    [b]缓存变量[/b]DOM遍历是昂贵的,所以尽量将会重用的元素缓存。//糟糕h=$('#element').height();$('#element').css('height',h-20);//建议$element=$('#element');h=$element.height();$element.css('height',h-20);[b]避免全局变......
  • jQuery动画插件: Velocity.js
    官方:[url]http://julian.com/research/velocity/[/url]介绍:[url]http://www.w3ctech.com/topic/1403[/url]使用Velocity.js改善用户体验[url]http://www.w3ctrain.com/2015/11/15/faster-ui-animations-with-velocity-js/[/url]使用VELOCITY.JS来改善和......
  • Debian 11安装搜狗输入法不能正常使用解决记录
    linux版本:DistributorID:DebianDescription: DebianGNU/Linux11(bullseye)Release: 11Codename: bullseyeLinuxming5.10.0-22-amd64#1SMPDebian5.10.178-3(2023-04-22)x86_64GNU/Linux在使用最新的搜狗输入法()时,发现fcitx正常识别,但是通过Ctrl+Space无法正......
  • PECMD 是一种管理和调试 Windows PE 系统的命令行工具,主要用于在 WinPE 环境下进行系
    PECMD是一种管理和调试WindowsPE系统的命令行工具,主要用于在WinPE环境下进行系统管理、修复和救援等操作。根据资料记录,PECMD已经发布了如下版本:PECMD2003:发布于2003年,适用于WindowsPE1.0版本。PECMD2005:发布于2005年,适用于WindowsPE2.0版本,新增支持更......
  • 分享10个最好的jQuery表单插件
    为web设计或者开发者来说,表单是我们经常需要打交道的设计元素之一。不论你开发登陆功能,在线购物功能,或者是注册功能,你都需要使用表单来执行用户输入。但其实并不是很多开发人员都关心开发或者设计表单元素。而表单设计最重要的目的在于能够将表单设计超越它本身结构以达到使用体......
  • JQuery 导航插件和图表
    [b][color=red]导航代码例子集[/color][/b]:[url]http://www.skyuu.net/jscode/adsCode/caidandaohang/[/url]15个最新的jQuery导航菜单插件[url]http://www.bobd.cn/resources/others/50381.html[/url]这篇文章中,将向大家展示采用jQuery最新技术的导航菜单......
  • jQuery队列控制方法详解queue()/dequeue()/clearQueue()
    jQuery遍历-jQuery.queue()方法:[url]http://www.w3school.com.cn/jquery/data_jquery_queue.asp[/url]jQuery核心中,有一组队列控制方法,这组方法由queue()/dequeue()/clearQueue()三个方法组成,它对需要连续按序执行的函数的控制可以说是简明自如,......
  • jquery插件合集之分页插件[表单和表格]
    [url]http://www.skygq.com/2011/01/24/jquery%E6%8F%92%E4%BB%B6%E5%90%88%E9%9B%86%E4%B9%8B%E5%88%86%E9%A1%B5%E6%8F%92%E4%BB%B6/[/url][color=red][b]jPaginate:AFancyjQueryPaginationPlugin[/b][/color][url]http://tympanus.net/codrops/2......
  • 4 个多才多艺的 jQuery 下拉菜单插件
    [url]http://www.php100.com/html/webkaifa/javascript/2012/0607/10512.html[/url]这里我们收集了4个最棒的jQuery下拉菜单插件,提供很多特性,例如自动完成、搜索、标签、多选、ajax等。1.ddSlickddSlick是一个轻量级的jQuery插件用来实现定制的下......
  • jQuery实现多级手风琴菜单
    手风琴菜单一般用于下拉导航,由于外观非常简洁,使用起来跟手风琴一样可以拉伸和收缩而得名,项目中适当应用手风琴效果会给用户带来非常好的体验。本文借助jQuery插件轻松打造一个非常不错的手风琴效果的菜单。[img]http://www.helloweba.com/attachments/fck/multi_menu.gif[/img]De......