jQuery 中,大部分的操作都基於 HTML DOM,所以我們必須確定頁面文件已經完全下載好才開始執行你的程式,jQuery 提供下面這個函式來處理 DOM ready 事件 (DOMContentLoaded):
$(document).ready(function() {
// 這裡放你要執行的程式碼
coolouis 發表在 痞客邦 留言(0) 人氣(304)
jCarousel Lite Offers a multi-option carousel (slider)
http://www.gmarwaha.com/jquery/jcarousellite/
coolouis 發表在 痞客邦 留言(0) 人氣(26)
PHP Magic Constants: __LINE__ , __FILE__ , __FUNCTION__ , __CLASS__ , and __METHOD__
<?php
print(__FILE__);
coolouis 發表在 痞客邦 留言(0) 人氣(37)
The style property gives access to these inline styles, it will always overrule all other styles.
The general rule is that all dashes are removed from the CSS property names, and that the character after a dash becomes uppercase.
margin-left becomes marginLeft, text-decoration becomes textDecoration, and border-left-style becomes borderLeftStyle.
coolouis 發表在 痞客邦 留言(0) 人氣(29)
// Get dom element by id
function $(id){return
document.getElementById(id);}
coolouis 發表在 痞客邦 留言(0) 人氣(15)
Finding elements
[Long-distance travel]
Through the getElementById() and
getElementsByTagName() methods.
coolouis 發表在 痞客邦 留言(0) 人氣(19)
// Autoloading Objects
function __autoload($class_name) {
require_once $class_name . '.php';
}
coolouis 發表在 痞客邦 留言(0) 人氣(26)
下面是當前規則表達式裡可用的修飾.括號內的名字是那些修飾符的內部PCRE名字.
i (PCRE_CASELESS)
如果設置了這個修飾符,則表達式不區分大小寫.
coolouis 發表在 痞客邦 留言(0) 人氣(10)
我們每一個人的成長過程中,都是從模仿開始,對於程式設計應該也可以套用同樣的道理吧!所以每當我看到感興趣又有提供Source Code時,就會想download回來trace code了解它的製作方法,試著去拆解程式加上自己的想法,把東西變得更好符合自己的需求,其中有完整trace過的有phpbb、phpmyadmin和freenas。
對於書籍的選擇,我很喜歡O'Reilly的Cookbook這系列的書,因為裡面都是以Problem、Solution和Discussion為章節構架說明一個實例情況,當自己有碰到類似的問題時,腦海中就會浮現出很多的解法,就像火影忍中裡的鹿丸總是能從很多思路裡,找到一條最好的路徑。
coolouis 發表在 痞客邦 留言(0) 人氣(26)
文件參考 : http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
coolouis 發表在 痞客邦 留言(0) 人氣(22)