Browse Source

src : jsHinted; remove getStyleProperty from closure; jsHint comment;

pull/96/head
David DeSandro 14 years ago
parent
commit
60dba42f1f
  1. 28
      jquery.isotope.js
  2. 5
      jquery.isotope.min.js

28
jquery.isotope.js

@ -1,5 +1,5 @@
/**
* Isotope v1.3.110604
* Isotope v1.3.110620
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
@ -9,14 +9,19 @@
* Copyright 2011 David DeSandro / Metafizzy
*/
/*global Modernizr: true */
(function( window, $, undefined ){
// helper function
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
// ========================= getStyleProperty by kangax ===============================
// http://perfectionkills.com/feature-testing-css-properties/
var getStyleProperty = (function(){
var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms'];
var prefixes = 'Moz Webkit Khtml O Ms'.split(' ');
function getStyleProperty( propName, element ) {
element = element || document.documentElement;
@ -29,10 +34,10 @@
}
// capitalize
propName = propName.charAt(0).toUpperCase() + propName.slice(1);
propName = capitalize( propName );
// test vendor specific properties
for (var i=0, l=prefixes.length; i<l; i++) {
for ( var i=0, len = prefixes.length; i < len; i++ ) {
prefixed = prefixes[i] + propName;
if ( typeof style[ prefixed ] === 'string' ) {
return prefixed;
@ -40,9 +45,6 @@
}
}
return getStyleProperty;
})();
var transformProp = getStyleProperty('transform');
// ========================= miniModernizr ===============================
@ -68,7 +70,6 @@
*/
var docElement = document.documentElement,
vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
tests = [
{
name : 'csstransforms',
@ -84,6 +85,7 @@
if ( test ){
var st = document.createElement('style'),
div = document.createElement('div'),
vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
mq = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)';
st.textContent = mq + '{#modernizr{height:3px}}';
@ -452,7 +454,7 @@
// trigger _updateOptionName if it exists
_updateOption : function( optionName ) {
var updateOptionFn = '_update' + optionName.charAt(0).toUpperCase() + optionName.slice(1);
var updateOptionFn = '_update' + capitalize( optionName );
if ( this[ updateOptionFn ] ) {
this[ updateOptionFn ]();
}
@ -856,7 +858,7 @@
}
// position the brick
x = this.masonry.columnWidth * shortCol;
var x = this.masonry.columnWidth * shortCol,
y = minimumY;
this._pushPosition( $brick, x, y );
@ -1042,7 +1044,7 @@
}
// position the brick
x = minimumX;
var x = minimumX,
y = this.masonryHorizontal.rowHeight * smallRow;
this._pushPosition( $brick, x, y );

5
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save