Switch to using javascript widgets using site styling

- Quickstart selector is implemented using bootstrap-select rather than the dropdown button used elsewhere
- Quickstart selector is still to be styled
This commit is contained in:
Kurtis Seebaldt and Nick Street
2013-08-14 15:42:35 +01:00
parent 6307a2bf04
commit 04efbcf66f
9 changed files with 918 additions and 62 deletions
+4 -21
View File
@@ -12,24 +12,10 @@ $(function(){
return this;
};
//OPENS ITEM DROPDOWN WIDGET
$(".js-item--open-dropdown").click(function () {
var dropdownItem = $(this).parents(".js-item-dropdown--wrapper");
var documentHeight = $(document).height();
var headerHeight = $("header").outerHeight();
var footerHeight = $("footer").outerHeight();
var scrimHeight = documentHeight - headerHeight - footerHeight;
dropdownItem.toggleClass("js-open");
dropdownItem.siblings().removeClass("js-open");
$(this).parents(".js-item-dropdown-widget--wrapper").siblings().find(".js-item-dropdown--wrapper").removeClass("js-open");
$("#scrim").addClass("js-show").css("height", scrimHeight).css("top", headerHeight);
$("#scrim").click(function() {
$(".js-item-dropdown--wrapper").removeClass("js-open");
$(this).removeClass("js-show");
});
$("#scrim").click(function() {
$(".js-item-dropdown--wrapper").removeClass("js-open");
$(".js-item--open-dropdown").removeClass("js-show");
$("#scrim").removeClass("js-show");
});
//OPENS SEARCH DROPDOWN
@@ -48,7 +34,6 @@ $(function(){
$(".body--container, .js-search-input-close").click(function() {
inputContainer.removeClass("js-show");
$(".nav-search").removeClass("js-highlight");
$("#scrim").removeClass("js-show");
});
});
@@ -112,8 +97,6 @@ $(function(){
});
var detectOs = function() {
if (navigator.appVersion.indexOf("Win")!=-1) return "Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) return "Mac";