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
def form_div(form, field, message = nil, options = {}, &block) | |
style_class = options[:class] || "" | |
style_class += " error" if form.object.errors[field].any? | |
div_options = {} | |
div_options[:class] = style_class unless style_class.blank? | |
buffer = "" | |
buffer << content_tag("div", div_options) do | |
inner_buffer = yield |
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
$('.form-button-group').each(function(i, elem) { | |
$elem = $(elem); | |
var button = elem.find(".button"); | |
var width = (parseInt(button.width())); | |
alert(width); | |
$elem.css({ | |
paddingRight: width | |
}); | |
}); |
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
Original | |
<%= link_to("Download", @video.assets_url, :class => "button button-small button-generic") unless @video.assets.blank? %> | |
What I want to work | |
<% if @video.assets.blank? %> | |
<li> |
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
def tooltip(location, &block) | |
content = capture(&block) | |
tooltip_carrot = "<span class=\"icon icon-tooltip-carrot\"></span>".html_safe | |
content_tag(:span, (content + tooltip_carrot), :class => "tooltip tooltip-#{location}") | |
end | |
// I want a param that I can set that will add this line of code (below) before the tooltip_carrot snippet is added. I want the param to be optional so if I dont set it the code just wont be added. | |
<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a> |
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
def tooltip(location, close=false, &block) | |
content = capture(&block) | |
if close == true | |
"<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a>".html_safe | |
end | |
tooltip_carrot = "<a class=\"close-tooltip\"><span class=\"icon icon-close-tooltip\"></span></a><span class=\"icon icon-tooltip-carrot\"></span>".html_safe | |
content_tag(:span, (content + tooltip_carrot), :class => "tooltip tooltip-#{location}") | |
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
img | |
width: 116px | |
-webkit-animation: swing 3s infinite ease-in-out | |
-webkit-transform-origin: top | |
-moz-animation: swing 3s infinite ease-in-out | |
-moz-transform-origin: top | |
float: left | |
margin: -40px 0px 0 -130px | |
.topic-dev | |
img |
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 child.code_challenge? && !logged_in? %> | |
<%= badge_image child, :alt => "", :class => "object-image" %> | |
<h4><%= child.title %></h4> | |
<% else %> | |
<%= link_to_unit child do %> | |
<%= badge_image child, :alt => "", :class => "object-image" %> | |
<% if current_user && current_user.has_badge?(child.badge) %> | |
<span class="icon icon-unlocked-badge-small"></span> | |
<% 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
class NavLabels | |
constructor: () -> | |
$label = $(this).find(".nav-label-container") | |
mouseIn = () -> | |
$label.animate { | |
opacity: 1 | |
top: 45 | |
}, 400 | |
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
$("#topic-tabs a").live("click", function(){ | |
$("#topic-tabs a").removeClass("selected"); | |
$(this).addClass("selected"); | |
}); | |
$(".topic-tab-all").live("click", function(){ | |
$(".topic").show(); | |
}); | |
$(".topic-tab-design").live("click", function(){ | |
$(".topic").hide(); |
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
$("#topic-tabs a").on("click", function(){ | |
$("#topic-tabs a").removeClass("selected"); | |
$(this).addClass("selected"); | |
}); | |
$(".topic-tab-all").on("click", function(){ | |
$(".topic-group").show(); | |
}); | |
$(".topic-tab-design").on("click", function(){ | |
$(".topic-group").hide(); |
OlderNewer