Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit 1a5850e

Browse files
committed
update
1 parent 65efbc9 commit 1a5850e

File tree

4 files changed

+30
-37
lines changed

4 files changed

+30
-37
lines changed

‎src/css/style.css

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎src/css/style.dropdown.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
.dropdown .employ-toggle { text-decoration: none; }
1313
.dropdown .employ-toggle.click {
1414
border-radius: 30px;
15+
transition: all 0.1s ease-in-out;
1516
font-size: 14px;
1617
padding: 2px 12px;
17-
color: #2d2d2d;
18+
color: #acacac;
1819
}
1920

2021
.dropdown .employ-toggle.click:hover {
21-
background-color: #d9d9d9;
22+
background-color: white;
2223
}
2324

2425
.dropdown ul.expand-dropdown {

‎src/index.html

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88
<title>CSS UI - Dropdown menu</title>
99

1010
<!-- CSS styles -->
11-
<link rel="stylesheet" href="css/style.css">
11+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css">
12+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
13+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600&amp;subset=latin-ext">
14+
<link rel="stylesheet" href="https://css-ui.github.io/css/cssui.min.css">
15+
<link rel="stylesheet" href="css/style.dropdown.css">
16+
<style>
17+
body {
18+
background-color: #f2f2f2;
19+
font-family: 'Open Sans', sans-serif;
20+
}
21+
</style>
1222
</head>
1323
<body>
1424
<div class="wrapper" style="padding: 25px; width: 200px;">
@@ -33,7 +43,21 @@
3343
</div>
3444

3545
<!-- javascript libraries and plugins -->
36-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
37-
<script src="js/jquery.dropdown.menu.js"></script>
46+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
47+
<script>
48+
$(function() {
49+
$('.employ-toggle').on('click', function() {
50+
var dropdown = '.expand-dropdown';
51+
var employ = '.employ-toggle';
52+
$(dropdown).fadeToggle('fast');
53+
$(dropdown).on('click', function(e) {
54+
var target = e.target;
55+
if (!$(target).is(employ) && !$(target).parents().is(employ)) {
56+
$(dropdown).hide();
57+
}
58+
});
59+
});
60+
});
61+
</script>
3862
</body>
3963
</html>

‎src/js/jquery.dropdown.menu.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /