Created
January 22, 2014 12:36
-
-
Save Adirael/8558006 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vertical = 0; | |
var horizontal = 0; | |
var cuadrada = 0; | |
jQuery('div.play').each( | |
function(index, Element){ | |
if(jQuery(Element).width() > jQuery(Element).height()){ | |
horizontal = horizontal + 1; | |
} else if (jQuery(Element).width() < jQuery(Element).height()) { | |
vertical = vertical + 1; | |
} else { | |
cuadrada = cuadrada +1; | |
} | |
} | |
); | |
console.log('Totales: ' + jQuery('div.play').length + ', Horizontales: ' + horizontal + ', Verticales: ' + vertical + ', Cuadradas: ' + cuadrada); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment