当前位置: 首页 > news >正文

苏州兼职网站开发wordpress主题移动端

苏州兼职网站开发,wordpress主题移动端,水果网页设计图片,百度竞价课程jquery.mypagination.js 文件#xff1a; /* * * * jquery分页插件* 1.0 zheng 2014-03-18 * 1.1 兼容url包含#号地址#xff0c;GoToPage可以指定锚点#xff08;特殊需求#xff09;2014-04-10 09:00:34* 1.2 可以配置分页条列出页面数* 1.3 增加了页面码跳转功能* …jquery.mypagination.js 文件 /* * * * jquery分页插件* 1.0  zheng 2014-03-18 * 1.1  兼容url包含#号地址GoToPage可以指定锚点特殊需求2014-04-10 09:00:34* 1.2  可以配置分页条列出页面数* 1.3  增加了页面码跳转功能*  $(#mypage).scPagination(555, {*              pageSize: 10,//每页显示的记录条数*myPagerCount:10,//分页条显示的页面个数*              callback: function (page) {*                  alert(选择了页码page);*              }*          });*/$.fn.scPagination function (totalProperty, opts) {opts $.extend({pageSize: 10,myPagerCount:10,callback: function () {}}, opts || {});return this.each(function () {function numPages() {return Math.ceil(totalProperty / opts.pageSize);}function selectPage(page) {return function () {currPage page;if (page 1) currPage 1;if (page numPages()) currPage numPages();render();opts.callback(currPage);}}function render() {var html div classPagediv[共span classTotal totalProperty /span条]/diva idpage-first hrefjavascript:void(0);首页/aa idpage-prev hrefjavascript:void(0);上页/a;var fistPage1;var lastPagenumPages();if(currPageMath.ceil((opts.myPagerCount-1)/2)){fistPagecurrPage-Math.ceil((opts.myPagerCount-1)/2);}if(fistPagenumPages()-opts.myPagerCount1){fistPagenumPages()-opts.myPagerCount1;}if(fistPage1)fistPage1;lastPageopts.myPagerCountfistPage-1;if(lastPagenumPages())lastPagenumPages();for (i fistPage; i lastPage; i) {//if (currPage i numPages() currPage i 0) {html a hrefjavascript:void(0); classNumPage i /a;// }}html a idpage-next hrefjavascript:void(0);下页/aa  idpage-last hrefjavascript:void(0);尾页/ainput idtxtGoTo classpage-num/a idbtnGoTo hrefjavascript:void(0);GO/a/div;if (currPage 0) {}if (currPage numPages()) {}panel.empty();panel.append(html);$(#page-first, panel).bind(click, selectPage(1));$(#page-prev, panel).bind(click, selectPage(currPage - 1));$(#page-next, panel).bind(click, selectPage(currPage 1));$(#page-last, panel).bind(click, selectPage(numPages())); $(.NumPage).each(function () {$(this).bind(click, selectPage(parseInt($(this).text())));if (parseInt($(this).text()) (currPage)) {$(this).attr(class, Selected);}});$(input.page-num, panel).val(currPage).change(function () {selectPage($(this).val())();});$(#btnGoTo,panel).bind(click, function(){var goPageparseInt($(#txtGoTo).val());selectPage(goPage)();}); if (request(pageIndex) ! ) {$(.Selected).each(function () {$(this).attr(class, NumPage);});$(.NumPage).each(function () {if (parseInt($(this).text()) parseInt(request(pageIndex))) {$(this).attr(class, Selected);}});}}var currPage 1;if (request(pageIndex) ! ) {currPage parseInt(request(pageIndex));}var panel $(this);render();function request(paras) {var url location.href;var paraString url.substring(url.indexOf(?) 1, url.length).split();var paraObj {}for (i 0; j paraString[i]; i) {paraObj[j.substring(0, j.indexOf()).toLowerCase()] j.substring(j.indexOf() 1, j.length);}var returnValue paraObj[paras.toLowerCase()];if (typeof (returnValue) undefined) {return ;} else {return returnValue;}}});}//获取url参数 request(ID)function request(paras) {var url location.href;var splitChar /[#]/;//设置分隔字符var paraString url.substring(url.indexOf(?) 1, url.length).split(splitChar);var paraObj {}for (i 0; j paraString[i]; i) {paraObj[j.substring(0, j.indexOf()).toLowerCase()] j.substring(j.indexOf() 1, j.length);}var returnValue paraObj[paras.toLowerCase()];if (typeof (returnValue) undefined) {return ;} else {return returnValue;}}function GoToPage(page, anchor) {var oUrl this.location.href.toString();if (anchor oUrl.indexOf(# anchor) 0) {oUrloUrl.replace(# anchor, );}var re eval(/(pageIndex)([^|#]*)/gi);var nUrl oUrl.replace(re, pageIndex page);if (request(pageIndex) ) {if (oUrl.indexOf(?) 0) {nUrl nUrl ?pageIndex page;}else {nUrl nUrl pageIndex page;}}if (anchor oUrl.indexOf(# anchor) 0) {//链接到锚点anchor anchor.replace(#, );nUrl nUrl # anchor;}this.location nUrl;}function replaceParamVal(paramName, replaceWith) {var oUrl this.location.href.toString();var re eval(/( paramName )([^|#]*)/gi);var nUrl oUrl.replace(re, paramName replaceWith);this.location nUrl;}/***用到的样式 为了方便直接写在了此处**/document.write( style type\text/css\);document.write(/*分页开始*/);document.write(.Page);document.write({);document.write(height: 26px;);document.write(});document.write(.Page div);document.write({);document.write(display: inline-block;);document.write(zoom: 1;);document.write(font-size: 14px;);document.write(});document.write(.Page .Total);document.write({);document.write(color: #cc0000;);document.write(});document.write(.Page a);document.write({);document.write(padding: 4px 5px;);document.write(height: 14px;);document.write(line-height: 14px;);document.write(font-size: 14px;);document.write(border: 1px solid #d5d5d5;);document.write(margin: 0px 5px;);document.write(display: inline-block;);document.write(});document.write(.Page a:hover);document.write({);document.write(text-decoration: underline;);document.write(border-color: #cc0000;);document.write(});document.write(.Page .Selected);document.write({);document.write(background: #cc0000;);document.write(border-color: #cc0000;);document.write(color: #ffffff;);document.write(display: inline-block;);document.write(zoom: 1;);document.write(});document.write(.Page input);document.write({);document.write(width:40px;);document.write(overflow-x:visible;);document.write(padding: 4px 5px;);document.write(height: 14px;);document.write(line-height: 14px;);document.write(font-size: 14px;);document.write(border: 1px solid #d5d5d5;);document.write(margin: -3px 0px 0px 5px;);document.write(display: inline-block;);document.write(});document.write(/*分页结束*/);document.write( /style); test.html 测试文件 head       script typetext/javascript srchttp://code.jquery.com/jquery-latest.js/script       script typetext/javascript srcjquery.mypagination.js/script   /head    div idmypage classPagination stylemargin-bottom: 0px;/div  script           $(document).ready(function(){               $(#mypage).scPagination(555,{ pageSize:20, myPagerCount:10,                 callback:function(page){                       alert(page);                   }               });           });    /script
http://www.zqtcl.cn/news/970640/

相关文章:

  • 做一个中型网站需要多少钱网站建设的费用是不是含税的
  • 网站上的广告是怎么做的连云港 网站 建设
  • 济南做网站的好公司有哪些怎么做自己的app软件
  • 淄博网站建设团队企业门户网站有哪些
  • 东莞网站建设 织梦建设茶叶网站的目的
  • 做网站的背景图片要多大做房产网站
  • 洛阳做网站公司在哪无锡网络营销推广软件
  • 医疗机械网站怎么做无锡短视频seo
  • 做网站建设哪家公司好如何营销推广
  • 陕西百威建设监理有限司网站做吉祥物设计看什么网站
  • 网络营销站点推广的方法高端网站开发价格
  • 内部优惠券网站怎么做最新国际新闻事件今天
  • 辽宁大学网站怎么做app开发用什么编程语言
  • 3d建模在线制作网站阿里云域名注册官网
  • 创建网站大约多少钱网站建设排序题
  • 大庆做网站找谁机构编制网站建设
  • 网站标题特效网站弹出的对话框怎么做
  • 找深圳网站建设wordpress 页面背景
  • 企业网站怎么维护上海注册建网站
  • 四川省建设工程造价信息网站便宜做网站价格
  • 医院网站优化策划网站开发的项目需求
  • 网站优化公司服务直播软件怎么开发
  • 网站建设 有道翻译织梦修改网站后备份
  • 苏州网联盛网站建设做最好的在线看片网站
  • 一个空间怎么放2个网站陕西城乡住房建设部网站
  • 如何购买虚拟主机做网站企业查名
  • 动易网站默认密码网站怎么做 吸引人
  • 站长工具国产2023二级建造师证书查询官方网站
  • 微信小程序联盟网站北京网站建设华大
  • 人事怎么做招聘网站比对分析crm管理系统 一般包含