Tag: jQuery

  • FlexSlider 从这里开始

    FlexSlider 从这里开始

    Step 1 – Link files Add these items to theof your document. This will link jQuery and the FlexSlider core CSS/JS files into your webpage. You can also choose to host jQuery on your own server, but Google is nice enough to take care of that for us! <!– Place somewhere in the <head> of…

  • 用jQuery限制文本域(textarea)的字数

    有时候表示用户友好,我们显示下一文本域里已经输入了多少字符,字数提示。

  • 让 jQuery Datepicker 兼容 WordPress 和 WPML

    让 jQuery Datepicker 兼容 WordPress 和 WPML

    没什么好说的,直接代码: jQuery(function($){ $.datepicker.regional[‘zh-hans’] = $.datepicker.regional[‘zh_CN’] = { closeText: ‘关闭’, prevText: ‘&#x3c;上月’, nextText: ‘下月&#x3e;’, currentText: ‘今天’, monthNames: [‘一月’,’二月’,’三月’,’四月’,’五月’,’六月’, ‘七月’,’八月’,’九月’,’十月’,’十一月’,’十二月’], monthNamesShort: [‘一’,’二’,’三’,’四’,’五’,’六’, ‘七’,’八’,’九’,’十’,’十一’,’十二’], dayNames: [‘星期日’,’星期一’,’星期二’,’星期三’,’星期四’,’星期五’,’星期六’], dayNamesShort: [‘周日’,’周一’,’周二’,’周三’,’周四’,’周五’,’周六’], dayNamesMin: [‘日’,’一’,’二’,’三’,’四’,’五’,’六’], weekHeader: ‘周’, dateFormat: ‘yy-mm-dd’, firstDay: 1, isRTL: false, showMonthAfterYear: true, yearSuffix: ‘年’}; $.datepicker.setDefaults( $.datepicker.regional[ “<?php echo defined(‘ICL_LANGUAGE_CODE’)?ICL_LANGUAGE_CODE:WPLANG;?>” ] ); }); 最后一行,这儿由于 WPML 和 WORDPRESS 的语言静态变量不一样,值也不同,需要判断然后输出,输出的值可能是 zh-hans,或 zh_CN,所以在第一行声明了两个变量来存储翻译。

  • CarouFredSel中TouchSwipe不支持带链接的元素

    CarouFredSel中TouchSwipe不支持带链接的元素

    http://caroufredsel.dev7studios.com/configuration.php caroufredsel 的配置页面里提到 swipe 这个属性:To enable this feature, you’ll need to include the jQuery.touchSwipe-plugin. 如果 HTML 结构是这样 <div class=”image_carousel”> <ul id=”carousel”> <li><img src=”slier.jpg”/><li> <li><img src=”slider2.jpg”/><li> </ul> </div> 你可以这样使这个幻灯片支持touchswipe <script> $(“#carousel”).carouFredSel({ auto : false, prev : ‘#c-prev’, next : ‘#c-next’, swipe : { onTouch : true, onMouse : true } }); </script> 倘若这个幻灯片的图片带来链接: <ul id=”carousel”> <li><a href=”foo.html”><img…

  • Backstretch Errot: has no method ‘backstretch’

    Backstretch Errot: has no method ‘backstretch’

    a simple jQuery plugin that allows you to add a dynamically-resized, slideshow-capable background image to any page or element Uncaught TypeError: Object function (e,t){return new v.fn.init(e,t,n)} has no method ‘backstretch’ maybe many guys got this error Maybe the issue is ’cause you put $.backstretch([“bg.jpg”]);   ahead of jquery.backstretch.js plugin, try switch the postion.

  • jQuery 向上弹出式菜单

    jQuery 向上弹出式菜单

    Slide Up Menu / jQuery 向上弹出式菜单 The jQuery Slide Up Menu it’s a good alternative to other existing menus giving the possibility to position the menu on the bottom of your header image or at the bottom of the window, acting like Windows Start Menu. You can let it behave like a normal menu or…

  • WordPress Portfolio work with Isotope and Infinite Scroll

    WordPress Portfolio work with Isotope and Infinite Scroll

    准备:需要的jQuery插件 Isotope: 神奇的布局精致的jQuery插件。演示 Infinite Scroll:无限滚动被称为autopagerize的,unpaginate,无尽的网页。但实质上,它是预取从随后出现的页面上的内容,并直接将其添加到用户的当前页面。http://www.infinite-scroll.com/ 演示 新建文章类型 portfolio 和 Portfolio 分类  function my_post_types() { register_post_type(‘portfolio’, array( ‘label’ => __(‘Portfolio’,’itc’), ‘singular_label’ => __(‘Portfolio’, ‘itc’), ‘_builtin’ => false, //’exclude_from_search’ => false, // Exclude from Search Results ‘capability_type’ => ‘post’, ‘public’ => true, ‘show_ui’ => true, ‘show_in_nav_menus’ => FALSE, ‘menu_position’ => 100, ‘rewrite’ => array( ‘slug’ => ‘portfolio-show’, ‘with_front’ => FALSE,…

  • Simple jquery horizontal accordion

    Simple jquery horizontal accordion

    有时候需要的功能很简单,不需要动不动就几千行的插件,就像这个水平手风琴效果。 html code Freebies Download free files to make your job easier. Tutorials Tips and tricks to help you keep up with the latest technology. Inspiration Get inspired by what other designers are doing. Inspiration Get inspired by what other designers are doing. css dode #horizontal_accordion{ list-style: none; margin: 0 0 0 -2px; padding: 0;…

  • jquery select option 操作

    jquery select option 操作

    jQuery 是一个非常强大的JS类库,现在越用觉得越好用了。 使用jquery如何操作select(下拉框)呢?主要讲下怎么动态添加option 动态选择option,假如我们的select 控件的 id 属性为 sel

  • CSS Flow Chart and Jquery Tips

    CSS Flow Chart and Jquery Tips

    Sigenics Managing Director 1 Managing Director 2 Managing Director 3 Managing Director 4 Managing Director 5 Managing Director 7 Managing Director 7 Managing Director 8 Managing Director 9 Managing Director 10 Managing Director 11 Managing Director 12 Managing Director 13 Sigenics Managing Director 1 Managing Director 2 Managing Director 3 Managing Director 4 Managing Director…