Skip to content

Commit 0aecdea

Browse files
removed animation from dropdown
1 parent 1a15323 commit 0aecdea

File tree

3 files changed

+27
-35
lines changed

3 files changed

+27
-35
lines changed

assets/index.scss

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ a {
139139
text-decoration: none;
140140
border-top: $border;
141141
background: transparent url("/images/city-arrow.png") no-repeat right center;
142+
143+
@media (max-width: $tablet) {
144+
padding-top: 7px;
145+
padding-bottom: 7px;
146+
}
142147

143148
&:hover, &.highlight {
144149
background: {
@@ -159,11 +164,7 @@ a {
159164
position: right center, left top;
160165
}
161166
}
162-
163-
small {
164-
color: $black;
165-
font-size: $city-size / 2;
166-
}
167+
167168
}
168169

169170
&:first-child a {
@@ -174,7 +175,9 @@ a {
174175
}
175176

176177
@media (max-width: $tablet) {
177-
178+
#menu {
179+
height: 0;
180+
}
178181
h2 {
179182
color: $white;
180183
font-weight: bold;
@@ -198,17 +201,15 @@ a {
198201
}
199202
}
200203

201-
@media (min-width: $tablet + 1) {
202-
#menu {
203-
display: block !important;
204-
}
205-
}
206-
207204
&.show_menu {
208205
@media (max-width: $tablet) {
206+
#menu {
207+
height: auto;
208+
}
209209
h2 {
210210
border-bottom-left-radius: 0;
211211
border-bottom-right-radius: 0;
212+
box-shadow: none;
212213
}
213214
ul {
214215
border-top-left-radius: 0;

javascripts/city_dropdown.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
$(function(){
22

3-
var tablet_width, class_name, wrapper, menu, header;
3+
var class_name, wrapper, header;
44

5-
tablet_width = 767;
6-
class_name = "show_menu";
7-
5+
class_name = "show_menu";
86
wrapper = $("#menu_wrapper");
9-
menu = wrapper.find("#menu");
107
header = wrapper.find("#menu_header");
11-
12-
menu.hide();
13-
8+
149
header.click(function(){
15-
if ($(window).width() <= tablet_width) {
16-
wrapper.stop().toggleClass(class_name);
17-
if (wrapper.hasClass(class_name)) {
18-
menu.slideDown();
19-
} else {
20-
menu.slideUp();
21-
}
22-
}
10+
wrapper.toggleClass(class_name);
2311
})
2412

2513
});

stylesheets/index.css

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ a {
100100
text-decoration: none;
101101
border-top: 1px solid #e0e0e0;
102102
background: transparent url("/images/city-arrow.png") no-repeat right center; }
103+
@media (max-width: 767px) {
104+
.wrapper #menu_wrapper ul li a {
105+
padding-top: 7px;
106+
padding-bottom: 7px; } }
103107
.wrapper #menu_wrapper ul li a:hover, .wrapper #menu_wrapper ul li a.highlight {
104108
background-color: #69b373;
105109
background-image: url("/images/city-arrow-hover.png"), url("/images/green-gradient.png");
@@ -112,12 +116,11 @@ a {
112116
background-image: url("/images/city-arrow-hover.png"), url("/images/green-gradient.png");
113117
background-repeat: no-repeat, repeat-x;
114118
background-position: right center, left top; }
115-
.wrapper #menu_wrapper ul li a small {
116-
color: #555555;
117-
font-size: 9px; }
118119
.wrapper #menu_wrapper ul li:first-child a {
119120
border: none; }
120121
@media (max-width: 767px) {
122+
.wrapper #menu_wrapper #menu {
123+
height: 0; }
121124
.wrapper #menu_wrapper h2 {
122125
color: white;
123126
font-weight: bold;
@@ -136,13 +139,13 @@ a {
136139
background-position: 10px center, left bottom;
137140
background-repeat: no-repeat, repeat-x;
138141
background-size: 18px, auto; } }
139-
@media (min-width: 768px) {
140-
.wrapper #menu_wrapper #menu {
141-
display: block !important; } }
142142
@media (max-width: 767px) {
143+
.wrapper #menu_wrapper.show_menu #menu {
144+
height: auto; }
143145
.wrapper #menu_wrapper.show_menu h2 {
144146
border-bottom-left-radius: 0;
145-
border-bottom-right-radius: 0; }
147+
border-bottom-right-radius: 0;
148+
box-shadow: none; }
146149
.wrapper #menu_wrapper.show_menu ul {
147150
border-top-left-radius: 0;
148151
border-top-right-radius: 0; } }

0 commit comments

Comments
 (0)