Created
September 23, 2014 10:50
-
-
Save g0ddest/64c924ed366d335f5cde 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 cheat = function(){ | |
var styles = {}; | |
$('#box span').each(function(index){ | |
if ($(this).attr('style') in styles){ | |
styles[$(this).attr('style')]['count'] += 1; | |
}else{ | |
styles[$(this).attr('style')] = {'count': 1, 'o': $(this)}; | |
} | |
}); | |
$.each(styles, function(i){ | |
if(this['count'] == 1){ | |
this['o'].trigger("click"); | |
window.setTimeout(function(){cheat()}, 10); | |
}; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment