少年幃禿的煩惱


心情也微微的...凸

最近的學習心得 都改放到 少年幃禿的煩惱@Google Sites

2008/06/25

Extend Pattern of jQuery

<script type="text/javascript"> (function($){ $.extend({ repeat: function(str, i) { if (isNaN(i) || i == 0) return ""; return str + $.repeat(str, i-1); } }) })(jQuery); </script> 使用這個 pattern 寫 jQuery plugin, 當與 prototype 同時使用的時候, 不會有衝突問題.