Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit 6e7495d

Browse files
committed
Update
1 parent e64930d commit 6e7495d

File tree

3 files changed

+18
-25
lines changed

3 files changed

+18
-25
lines changed

src/css/style.dropdown.css

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ body {
1313
font-family: 'Segoe UI', Frutiger, 'Frutiger Linotype', 'Dejavu Sans', 'Helvetica Neue', Arial, sans-serif;
1414
}
1515

16-
.content {
17-
padding: 50px;
18-
}
19-
2016
/*
2117
dropdown menu
2218
*/
@@ -26,51 +22,50 @@ body {
2622
}
2723

2824
.dropdown p { margin: 0; }
29-
.dropdown .toggle { text-decoration: none; }
30-
31-
.dropdown .click {
25+
.dropdown .employ-toggle { text-decoration: none; }
26+
.dropdown .employ-toggle.click {
3227
border-radius: 30px;
3328
font-size: 14px;
3429
padding: 2px 12px;
3530
color: #2d2d2d;
3631
}
3732

38-
.dropdown .click:hover {
33+
.dropdown .employ-toggle.click:hover {
3934
background-color: #d9d9d9;
4035
}
4136

42-
.dropdown ul.expand {
37+
.dropdown ul.expand-dropdown {
4338
list-style: none;
4439
margin-top: 5px;
4540
position: absolute;
4641
display: none;
4742
top: 100%;
4843
}
4944

50-
.dropdown ul.expand li {
45+
.dropdown ul.expand-dropdown li {
5146
min-width: 110px;
5247
margin: 0;
5348
}
5449

55-
.dropdown ul.expand li a.top {
50+
.dropdown ul.expand-dropdown li a.top {
5651
border-top-right-radius: 3px;
5752
border-top-left-radius: 3px;
5853
}
5954

60-
.dropdown ul.expand li a.bottom {
55+
.dropdown ul.expand-dropdown li a.bottom {
6156
border-bottom-right-radius: 3px;
6257
border-bottom-left-radius: 3px;
6358
}
6459

65-
.dropdown ul.expand li a {
60+
.dropdown ul.expand-dropdown li a {
6661
background-color: #484848;
6762
text-decoration: none;
6863
display: block;
6964
padding: 5px 10px;
7065
color: white;
7166
}
7267

73-
.dropdown ul.expand li a:hover {
68+
.dropdown ul.expand-dropdown li a:hover {
7469
background-color: #333;
7570
color: white;
7671
}

src/index.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@
99

1010
<!-- CSS styles -->
1111
<link rel="stylesheet" href="css/style.dropdown.css">
12-
1312
</head>
14-
15-
<!-- content -->
16-
<div class="content">
13+
<body>
14+
<div class="wrapping" style="padding: 25px;">
1715

1816
<!-- dropdown menu -->
1917
<div class="dropdown">
2018

21-
<!-- menu icon -->
19+
<!-- dropdown menu click -->
2220
<div class="clear">
23-
<a class="toggle click float right" href="#">
21+
<a class="employ-toggle click float right" href="#">
2422
<i class="fa fa-ellipsis-v " aria-hidden="true"></i>
2523
</a>
2624
</div>
2725

2826
<!-- show or hide menu -->
29-
<ul class="expand">
27+
<ul class="expand-dropdown">
3028
<li><a href="#" class="top">One</a></li>
3129
<li><a href="#">Two</a></li>
3230
<li><a href="#" class="bottom">Three</a></li>

src/js/jquery.dropdown.menu.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* Dropdown toggle.
44
*/
55
$(function() {
6-
$('.toggle').click(function() {
7-
$('.expand').toggle();
6+
$('.employ-toggle').click(function() {
7+
$('.expand-dropdown').toggle();
88
});
99
$(document).click(function(e) {
1010
var target = e.target;
11-
if (!$(target).is('.toggle') && !$(target).parents().is('.toggle')) {
12-
$('.expand').hide();
11+
if (!$(target).is('.employ-toggle') && !$(target).parents().is('.employ-toggle')) {
12+
$('.expand-dropdown').hide();
1313
}
1414
});
1515
});

0 commit comments

Comments
 (0)