Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fa32e5
commit a6f053a
Showing
10 changed files
with
149 additions
and
3,561 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,35 @@ | ||
$.getJSON("https://res.de.dariah.eu/globalmenu/menu.json", function (data) { | ||
$.getJSON("https://res.de.dariah.eu/globalmenu/menu.json", function( data ) { | ||
|
||
var ul_main = $("<ul id='home_dropdown_menu' class='nav_list -level-2 -portal'></ul>"); | ||
var ul_main = $("<ul id='home_dropdown_menu' class='nav_list -level-2 -portal'></ul>"); | ||
|
||
$.each(data['menu'], function (key, val) { | ||
if (typeof val.title !== "undefined") { | ||
var li = $("<li class='nav_item -level-2'>", { | ||
id: 'li' + key, | ||
text: val.title | ||
}); | ||
var a = $("<a class='nav_link' href='" + val.link + "'>" + val.title + "</a></li>"); | ||
$.each(data['menu'], function (key, val) { | ||
if (typeof val.title !== "undefined") { | ||
var li = $("<li class='nav_item -level-2'>", { id: 'li' + key, text : val.title }); | ||
var a = $("<a class='nav_link' href='" + val.link + "'>" + val.title + "</a></li>"); | ||
|
||
a.appendTo(li); | ||
a.appendTo(li); | ||
|
||
if (val.submenu != null) { | ||
if (val.submenu != null) { | ||
|
||
var ul = $("<ul>", { | ||
class: 'nav_list -level-3' | ||
}); | ||
var ul = $("<ul>", { class: 'nav_list -level-3' }); | ||
|
||
$.each(val.submenu, function (key, sub) { | ||
if (sub.title) { | ||
ul.append("<li class='nav_item -level-3'><a class='nav_link' href='" + sub.link + "'>" + sub.title + "</a></li>") | ||
} else { | ||
ul.append("<li class='nav_item -level-3'><hr></li>") | ||
} | ||
$.each(val.submenu, function (key, sub) { | ||
if (sub.title) { | ||
ul.append("<li class='nav_item -level-3'><a class='nav_link' href='" + sub.link + "'>" + sub.title + "</a></li>") | ||
} | ||
else { | ||
ul.append("<li class='nav_item -level-3'><hr></li>") | ||
} | ||
|
||
}); | ||
}); | ||
|
||
ul.appendTo(li); | ||
} | ||
li.appendTo(ul_main); | ||
} | ||
}); | ||
ul.appendTo(li); | ||
} | ||
li.appendTo(ul_main); | ||
}}); | ||
|
||
$('ul#home_dropdown_menu').replaceWith(ul_main); | ||
$( 'ul#home_dropdown_menu' ).replaceWith(ul_main); | ||
|
||
}).fail(function () { | ||
console.log('Error loading menu JSON!'); | ||
}); | ||
}).fail(function() { | ||
console.log( 'Error loading menu JSON!' ); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.