您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

jQuery更改li菜单选中项的背景颜色

1,180 views
jQuery更改li菜单选中项的背景颜色jQuery更改li菜单选中项的背景颜色 $("#leftpane li").click(function(){ //$(this).toggle(); var ix=$(this).index(); $("#leftpane li").each(function(){ var lx=$(this).index(); if (lx!=ix){ $(this).css("background",""); }else{ $(this).css("background","#006000"); } }); $('#leftpane').listview('refrsesh'); });

jQuery实现彩带效果的网页加载条动画

935 views
jQuery实现彩带效果的网页加载条动画jQuery实现彩带效果的网页加载条动画 &nbsp; &nbsp; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>页面初加载的动画</title> <style type="text/css"> body{margin:0;} .to......

jQuery实现倒计划按钮

911 views
jQuery实现倒计划按钮页面中需要实现某个按钮点击完后,禁用它,并显示倒计时。这个默认是3秒,代码如下: <pre><head> <title>test count down button</title> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('#btn').click(function () { var count = 3; var countdown = setI......

javascript string轉int int轉string

875 views
javascript string轉int int轉string在javascript中 雖然是弱型別 可是有時候還是會用到要把int轉string 或是把string轉int的情況 字串轉數字 str轉int parseInt 同時這函式有個強大的功能 就是可以換成不同基底的數 例如parseInt(“ff”,16) ===> 255 ff以16為基底就是255 任何基底都可以轉換 (至少16以下沒問題3 7 11 13 17 我都轉過) [20080806實測結果 基底36以下都可以轉 所以javascript parseint這函式最大基底就是36] 數字轉字串 int轉str 大部份的物件都有.toString的方法 用這即可

jQuery Mobile 数据刷新

873 views
jQuery Mobile 数据刷新JQM里面当我们更新了某些页面标签(如: listview, radiobuttons, checkboxes, select menus)里的数据时,必须做refresh操作. 为什么必须做refresh操作操作呢?因为JQM在做页面渲染的时候,为了使样式跟客户端程序相似, 隐藏了原始的标签然后用一些新的标签和自定义的样式来表现原标签,其实新样式的标签已经不是原来的标签,所以更新了数据必须做refresh操作.   各类标签的刷新 1.Textarea fields 1 2 $('body').prepend('<textarea id="myTextArea"></textarea>'); $('#myTextArea').textinput(); 2.Te......