Skip to content

Commit

Permalink
Added click method to list related #20
Browse files Browse the repository at this point in the history
  • Loading branch information
esra committed May 14, 2014
1 parent ece9522 commit 5cb3204
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions web/templates/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,27 @@
var obj = JSON.parse(obj); //Parsed jsonstring
var currentobj = obj.objects
for (var i=0; i<currentobj.length; i++){ //objects dizinine bakıyor, isimleri yazdırıyor
for(var j=0; j<=26; j++){
for(var j=0; j<=26; j++){ //sıralama için
if (currentobj[i].title != "" && (currentobj)[i].title[0].toUpperCase() == alphabet[j]){
$('.' + alphabet[j]).append('<li>' + (obj.objects)[i].title + ' </li>');
$('.' + alphabet[j]).append('<li id='+currentobj[i].title+'>' + (obj.objects)[i].title + ' </li>');

}

}
}




}
for(var j=0; j<=26;j++){
$('#'+(currentobj[i]).title).click( function(){
$('.L').append('<li>' + (currentobj[i]).title + ' </li>');
});
}

}
});

});
</script>

Expand Down Expand Up @@ -77,7 +89,12 @@
</ul>

</div>
<div class="ui-layout-center">Center</div>
<div class="ui-layout-center">
<ul>
<li class="L">Liste</li>

</ul>
</div>
<div class="ui-layout-east">East</div>
</body>
</html>

0 comments on commit 5cb3204

Please sign in to comment.