X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=blobdiff_plain;f=js%2Ftopology%2Fmainmenu.js;fp=js%2Ftopology%2Fmainmenu.js;h=8296288dfa9712445c93bfbe9f90fb7ad71931b0;hp=0000000000000000000000000000000000000000;hb=4ff4cfab60fd88f431c88603d57612fc489dc62f;hpb=ea20f018c05bcc4e56b2dfa3eee30af0d6ffabf3 diff --git a/js/topology/mainmenu.js b/js/topology/mainmenu.js new file mode 100644 index 0000000..8296288 --- /dev/null +++ b/js/topology/mainmenu.js @@ -0,0 +1,58 @@ +// Copyright (c) 2018 Maen Artimy +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +$(function () { + var path = window.location.pathname; + var url = window.location.href; + + var menu = '' + +/*
\ + Flow Control \ + \ +
\*/ + + //var logo = '
'; + + var hashtag = url.lastIndexOf('#') + var slash = url.lastIndexOf('/') + 1 + var filename = hashtag < 0 ? url.substring(slash) : url.substring(slash, hashtag); + + $('#menu').html(menu); + var $link = $('a[href="' + filename + '"]'); + $link.addClass("active"); + $link.parent().show(); + + $(".topmenu").click(function() { + //$("#myLinks").show(); + $("#myLinks").animate({height: "toggle"}, 120); + }) + + +});