added clickables to hide sites

This commit is contained in:
clemens 2016-05-31 13:58:47 +02:00
parent b2e2a80f9b
commit 95d9f33f69
2 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,9 @@
float:left;
padding:20px;
}
.lead > span {
margin: 10px;
}
</style>
<script>
var dataurl="caddy.json"

View File

@ -1,3 +1,6 @@
function onClick(obj) {
obj.toggle()
}
jQuery.fn.extend({
linklist: function (kwargs) {
var self = $(this);
@ -12,6 +15,12 @@ jQuery.fn.extend({
var site_div = $("<div>");
$(site_div).attr('id', sitename);
var site_list = $("<ul>");
var nav = $("<span>");
$(nav).click(function () {
onClick(site_div)
});
$(nav).text(sitename);
nav.appendTo($(".lead"));
$.each(attributes2.sites, function (key, attributes) {
var my_link = (typeof attributes['link'] != 'undefined') ? attributes['link'] : "";
var my_button = (typeof attributes['button'] != 'undefined') ? attributes['button'] : "";