Skip to content

Instantly share code, notes, and snippets.

@pedrozath
Created November 13, 2012 20:48
Show Gist options
  • Select an option

  • Save pedrozath/4068288 to your computer and use it in GitHub Desktop.

Select an option

Save pedrozath/4068288 to your computer and use it in GitHub Desktop.
$.fn.load_feature_content = function(obj, contents) {
var feature, feature_content;
contents.hide();
var items = ["active", "before-active", "after-active"];
for(i in items){
var item = items[i];
this.parent().find("."+item).removeClass(item);
}
this.addClass("active");
this.next().addClass("after-active");
this.prev().addClass("before-active");
feature = $(this).attr("data-feature");
feature_content = obj.find("div[data-feature=" + feature + "]");
feature_content.show();
};
.features-panel .feature-list li.before-active{
box-shadow: inset -2px -23px 15px -25px;
}
.features-panel .feature-list li.before-active a{
border-bottom: none;
}
.features-panel .feature-list li.active a{
border: none;
}
.features-panel .feature-list li.active {
background-color: #fff;
background-image: none;
}
.features-panel .feature-list li.after-active {
box-shadow: inset -2px 20px 15px -25px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment