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
module ApplicationHelper | |
def current_class?(test_path) | |
return 'active' if request.path == test_path | |
'' | |
end | |
end |
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
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
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
http://daigo.org/2011/09/quick-and-dirty-sticky-elements-when-scrolling-using-jquery/ |
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
# Ignore docs files | |
styles/.sass-cache | |
styles/.sass-cache/* | |
# Not working? | |
# Try: http://stackoverflow.com/questions/11451535/gitignore-not-working | |
# Try: http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring |
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
window.addEventListener("orientationchange", function() { | |
alert(window.orientation); | |
//do whatever you want on orientation change here | |
}, false); |
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
<a class="drop-down-toggle">Click me to reveal drop down box below...</a> | |
<div class="drop-down-wrapper"> | |
Hello, I will be revealed! | |
</div> |
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
<% if @project_quantity.each do |quantity| %> | |
<%= quantity.quantity %> | |
<% end.empty? %> | |
0 | |
<% end %> |
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
@mixin css-arrow($color:#000, $size:'5px', $direction:'up') | |
width: 0 | |
height: 0 | |
@if $direction == 'up' | |
border-right: $size solid transparent | |
border-left: $size solid transparent | |
border-bottom: $size solid $color | |
@if $direction == 'down' |
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
global $global_messages; | |
print $global_messages; |
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 escapeHtml(unsafe) { | |
return unsafe | |
.replace(/&/g, "&") | |
.replace(/</g, "<") | |
.replace(/>/g, ">") | |
.replace(/"/g, """) | |
.replace(/'/g, "'"); | |
} |
NewerOlder