模組化 jQuery 的編寫結構 - vmodel

因為長期使用 jQuery 開發的經驗,所以設計了一個模組化的框架套件。這個框架套可以輔助你在編撰 jQuery 的結構上能夠:提高重複使用模組、好維護每個細節、IDE 好查找。

animatedModal

animatedModal.js is a jQuery plugin to create a fullscreen modal with CSS3 transitions. You can use the transitions from animate.css or create your own transitions.

animatedModal-01

行動裝置的Angular權威指南

Mobile apps are not the next frontier for software developers, they’re already here. There are already 1.2 billion mobile web app users and that number is growing rapidly (Wikipedia). Soon, the number of mobile devices will exceed the number of people on the planet. At the rate at which the number of mobile devices is growing, it’s estimated that 5.1 billion people will be using mobile phones by 2017.

For us as app developers, it’s important that we develop for mobile technology if we want to stay relevant. With AngularJS, we have some great support for mobile, written by both the Angular team and the community.

用 javascript 判斷 IE 版本號

專案中需要判斷IE版本號,又因為 jQuery 2.0 去除了對流覽器版本號的判斷(它推薦特性檢測),於是就看到一老外寫的一段代碼:

var _IE = (function(){

    var v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i');

    while (

        div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',

        all[0]

    );

    return v > 4 ? v : false ;

}());

這段代碼著實巧妙!既簡介、有向後相容,一般做法都是:正則搜索 USER_AGENT ;
但因為歷史原因, USER_AGENT 一直都不準確,而且被各大廠商改的亂七八糟。

 

比如:

IE10 : Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)

IE11 : Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko

這都是些什麼亂七八糟的什麼字串啊?鬼知道 IE12會變成什麼?
所以使用特性檢測、或者USER-AGENT檢測既不可靠,也不向後相容。

大家可參酌此方法使用。

 

 

原文:http://julying.com/blog/determine-the-version-number-of-ie-with-javascript/

(Muki) 12篇RWD必讀的文章

Here at Mobify, we spend a fair share of our time collecting and sharing the most interesting resources on how to create amazing responsive web experiences. Hell, you might even call it a passion of ours!

In this post, I wanted to highlight some of the best RWD stories that got us excited this past month.

(If I missed any cool ones, let me know in the comments. Or if you've written something that you think should be included, post it as well!)

Let's dive in!