/** * 트위터 bootstrap js 패턴 */ ;(function($){ var Calculator = function( el, options ) { this.$el = $(el); this.options = $.extend({} , $.fn.calculator.defaults, options); } Calculator.prototype = { constructor : Calculator , show : function(){ console.log( this.options ); } } $.fn.calculator = function ( option ) { return this.each(function(){ var $this = $(this) , data = $this.data('calculator')..
(function($) { var o = $( {} ); $.each({ on: 'subscribe', trigger: 'publish', off: 'unsubscribe' }, function( key, api ) { $[api] = function() { o[key].apply( o, arguments ); } });})(jQuery);(function($) { var Twitter = { init: function() { this.template = '{{tweet}}'; this.query = '@javascript'; this.tweets = []; this.timer; this.cache(); this.bindEvents(); this.subscripti..
참고 url : http://lawrence.ecorp.net/inet/samples/regexp-parse.php match 된 찿은 경과를 배열 또는 RegExp 로 값을 찿을 수 있습니다. var str = "/product/detail.html?product_no=14&cate_no=1&display_group=2"; var pre = str.match(/product_no=([0-9]+)/); alert( RegExp.$1 ); // 14을 반환 function xtractReportType1(data) { var array = data.match(/\b[\S]+\b/g); return array[5] + " " + array[0] + " paint retail price: $" + array[..
Javascript: The Good Parts (Chapter 5) -Douglas Crockford Prototypal Inheritance in Javascript -Douglas Crockford Object-Oriented Javascript -Stoyan Stefanov Javascript Override Patterns -Andrea Giammarchi Simple JavaScript Inheritance -John Resig http://alexsexton.com/?p=51