From e0e44aedb60b7a22601ca65f69439a13dabeaee9 Mon Sep 17 00:00:00 2001 From: desandro Date: Thu, 7 Oct 2010 21:25:52 -0400 Subject: [PATCH] Attach a molequul object to the global jQuery object. --- src/jquery.molequul.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/jquery.molequul.js b/src/jquery.molequul.js index f2e98b6..a064a26 100755 --- a/src/jquery.molequul.js +++ b/src/jquery.molequul.js @@ -7,7 +7,7 @@ var usingTransforms = Modernizr.csstransforms; // var usingTransforms = false; - var molequulMethods = { + $.molequul = { filter : function( $cards ) { @@ -66,7 +66,7 @@ x = props.colW * shortCol + props.posLeft; y = minimumY; - position = molequulMethods.position( x, y ); + position = $.molequul.position( x, y ); // position the brick props.styleQueue.push({ $el: this, style: position }); @@ -195,7 +195,7 @@ this.molequul( 'getColCount', props ); if ( props.colCount !== prevColCount ) { // if column count has changed, do a new column cound - var colYs = molequulMethods.resetColYs( props ); + var colYs = $.molequul.resetColYs( props ); this.molequul( 'layout', props.$cards.filtered, colYs ); } @@ -283,7 +283,7 @@ $this.molequul( 'setup' ); } - var colYs = molequulMethods.resetColYs( props ); + var colYs = $.molequul.resetColYs( props ); $this .molequul( 'filter', props.$cards.all ) .molequul( 'layout', props.$cards.filtered, colYs ); @@ -311,20 +311,20 @@ }; - molequulMethods.position = usingTransforms ? molequulMethods.translate : molequulMethods.positionAbs; + $.molequul.position = usingTransforms ? $.molequul.translate : $.molequul.positionAbs; // molequul code begin $.fn.molequul = function( firstArg ) { // Method calling logic - var method = molequulMethods[ firstArg ]; + var method = $.molequul[ firstArg ]; if ( method ) { // remove firstArg, which is a string of the function name, from arguments var args = Array.prototype.slice.call( arguments, 1 ); return method.apply( this, args ); } else if ( !firstArg || typeof firstArg === 'object' ) { - return molequulMethods.init.apply( this, arguments ); + return $.molequul.init.apply( this, arguments ); }