Skip to content

Tag Archives: javascript

Simple loading svg inline in Vue

Our goal is to do this: <icon src=”plus.svg” /> So it rendered in DOM as <span cl...

網絡非平台

近年網頁前端開發講了又講、討論又討論的題目是: Web 1 vs Native。用 Web 技術還是用 Native 原生手機平台的?Native 速度、效能、反應也較好,但多平台...

A Note on Device Orientation Detection in Javascript

You want to know device height on orientation change in an webview. Here is my journey: sc...

Time picker key suggestion

前陣子遇到 UI 上有要求做個 Time picker 有以下要求: 遇上一題:在一個時間輸入有 0-9 鍵,在每輸入一鍵時就必需廢下一個輸入時用不用的鍵。例,輸入 2 時廢 6-...

DIY two-way binding in AngularJs

AngularJs provides a convenient two way bindings to wire up your model and view. But somet...

Watch only some targets at grunt.js

You have a grunt watch config like this: watch:{ deploy:{ files: ["app/**/*.js", "app/**/*...

Aware of globals in mocking using Squire.js

A typical spec would be like: But if you run the spec, it would result in will found $.fn....

LOC

覺得自己寫 code 心態上有所轉變。最近見到這樣的 code: $.get("/data/aa", function(data){ var result = &#...