Posts tagged jquery
Bonzo + Émile + Qwery = The New jQuery
Pjax →
pjax loads html from your server into the current page without a full page load. It’s ajax with real permalinks, page titles, and a working back button that fully degrades.
Alternative: ajaxify
jQuery & CDNs
Yeah, everybody loves jQuery, as well as Content Delivery Networks.
But in case you missed the announcements, there were two important things about jQuery and its CDN.
- jQuery Official: Hotlinking to be disabled on Jan 31, 2011
So if you’re using (hotlinking) jQuery from jquery.com, it’s time for you to switch to the Google AJAX CDN or the recommended source: http://code.jquery.com - ajax.microsoft.com renamed to ajax.aspnetcdn.com
If you’re a big fan of Microsoft (which is weird), and you’re hotlinking to their CDN, you should move to the new domain.
This change was made to increase performance because when a browser referenced the microsoft.com domain it would send any cookies from that domain across the wire with each request. By renaming to a domain name other than microsoft.com performance can be increased by as much to 25%. Note ajax.microsoft.com will continue to function but ajax.aspnetcdn.com is recommended.
正确配置 jQuery Tools .slideshow() 插件
jQuery Tools 是我最喜欢的 jQuery 插件,小巧,轻量,语义化做得很棒。
对一个幻灯插件来说,最讨厌的莫过于生成一堆无意义的 HTML 代码,比如之前用到的 Coin Slider,而 jQuery Tools 的 Tabs 包含的 .slideshow() 却非常友好,只是配置起来容易犯晕。
比如,官方 API 指南上说加上 autoplay: true 即可让幻灯自动播放,所以想当然地就写:
$(".slidetabs").tabs(".images > div", {
effect: 'fade',
fadeOutSpeed: "slow",
autoplay: true,
rotate: true,
interval: 50,
clickable: false
}).slideshow();
但其实不然,因为 jQuery Tools 的插件包含关系是这样的:jQuery > jQuery Tools > Tabs > Slideshow,比如 effect, fadeOutSpeed 这些参数都是属于 Tabs 插件的,而 autoplay, interval, clickable 则是 Slideshow 的,所以要写成这个样子:
$(".slidetabs").tabs(".images > div", {
effect: 'fade',
fadeOutSpeed: "slow",
rotate: true
}).slideshow({
autoplay: true,
interval: 5000,
clickable: false
});
Xiami feat. jQuery Mobile
用了一周的琐碎时间把旧版的虾米移动版 http://m.xiami.com 改造成现在这个样子。
Bulit w/ jQuery 1.4.4, jQuery Mobile 1.0a2, HTML5 (data-attr), CSS3.
现在还只是测试版,只实现了基本的功能,样式还没调整,所以遇到莫名其妙的东西请不要惊讶。

Update: 本来想放链接,想想还是算了吧。
jQuewy →
What is jQuewy?
JQuewy is a simple JavaScript file that takes the hassle out of including jQuery’s plugins. Instead of including loads of JavaScript files, you simply include jQuewy, and it does the work for you.