Created
February 21, 2015 20:58
-
-
Save ahmettek/392517378bcbb190a87c to your computer and use it in GitHub Desktop.
NPMPQd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="left"> | |
<ul> | |
<li rel="1">Elma</li> | |
<li rel="2">Çilek</li> | |
<li rel="3">Armut</li> | |
<li rel="4">Kiraz</l4> | |
<li rel="5">Vişne </li> | |
</ul> | |
</div> | |
<div class="right"> | |
<ul> | |
<li rel="4">Kiraz</li> | |
<li rel="3">Armut</li> | |
<li rel="1">Elma</li> | |
<li rel="2"> Çilek</li> | |
<li rel="5">Vişne</li> | |
</ul> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('li').click(function(){ | |
var selectedRel=$(this).attr("rel"); | |
var rightLiList=$(".right ul li"); | |
$.each( rightLiList, function( key, value ) { | |
alert(rightLiList[key].attr("rel")) | |
}); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.left,.right{ | |
float:left; | |
width:200px; | |
border:1px solid #ddd; | |
} | |
ul{margin:0;padding:0;} | |
ul li{cursor:pointer;padding:8px;width:100%;background:#f7f7f7;margin-bottom:2px;list-style:none;} | |
li:hover{background:#ddD;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment