-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path111-each.html
More file actions
35 lines (32 loc) · 776 Bytes
/
111-each.html
File metadata and controls
35 lines (32 loc) · 776 Bytes
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
<html>
<head>
<title>Jquery Giriş</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
.renkver{color:red;text-decoration: underline;list-style-type: none}
</style>
</head>
<body>
<ul>
<li>İlyas Bat</li>
<li>Ahmet Güzel</li>
<li>Mehmet Çirkin</li>
<li>Ayşe Fatma</li>
<li>domates biber</li>
</ul>
<ul class="iki">
<li id="foo">foadaso</li>
<li id="bar">baradssada</li>
<li id="baz">baasdasdasz</li>
</ul>
<script>
$('li').each(function(index){
$(this).addClass('renkver');
//removeClass
$(this).prepend(index+'-');
});
$('li').eq(1).addClass('renkver').prepend(1+'-');
$('ul').eq(1).append($('.iki li').index($('#baz')));
</script>
</body>
</html>