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
// The fadeOut() callback execute the function for each element. Sometimes we just need the function to be executed on the last element | |
lis = $('#menu li'); | |
var i = lis.length; | |
lis.fadeOut(300, function(){ | |
if (!--i) { | |
$('#element_to_animate').slideDown(300); | |
} | |
}); |
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
function forceClick(strSearch) { | |
var el = $(strSearch).get(0); | |
var evt = document.createEvent("MouseEvents"); | |
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
el.dispatchEvent(evt); | |
} |
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
<?php | |
$files = scandir(__dir path__); | |
$filesChoice = array(); | |
foreach ($files as $val): | |
if ($val[0] != ".") | |
$filesChoice[$val] = $val; | |
endforeach; | |
asort($filesChoice); | |
?> |
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
#!/usr/bin/env ruby | |
if ARGV[0].nil? || ARGV[0].match(/-h/) | |
puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]" | |
exit | |
end | |
require 'net/http' | |
require 'open-uri' | |
#require 'awesome_print' |
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
// JS | |
$('.ergo input, .ergo textarea').each(function() { | |
var label = $(this).parent().find('label[for="' + this.id + '"]'); | |
$(this).on('focus', function() { | |
label.addClass("focus"); | |
}); | |
$(this).on('keydown', function() { | |
label.addClass("hidden"); | |
}); |
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
.focus { | |
color: #DEDEDE; | |
} | |
.hidden { | |
visibility: hidden; | |
} |
NewerOlder