-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (35 loc) · 1.53 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>CustomSelect</title>
</head>
<body>
<!-- Option in original Select must match div.option in div.options -->
<div class="select_body" id="frist"> <!-- In custom select must be original select and .select must have a unique id -->
<select class="input" name="" id="nameOriginalSelect">
<option value="1">Value1</option>
<option value="2">Value2</option>
<option value="3">Value3</option>
<option value="4">Value4</option>
<option value="5">Value5</option>
</select>
<div class="select"> <!-- Button for open options -->
<p></p> <!-- The selected value will be written here -->
<p>▼</p>
</div>
<div class="options" id="nameOps"> <!-- Options -->
<p class="option option0">Value1</p> <!-- Number in the end need to props checks in original select(Count must start from 0) -->
<p class="option option1">Value2</p>
<p class="option option2">Value3</p>
<p class="option option3">Value4</p>
<p class="option option4">Value5</p>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"></script>
<script src="script.js"></script>
</body>
</html>