Last active
December 14, 2015 20:59
-
-
Save SinusMedii/5147777 to your computer and use it in GitHub Desktop.
06 my_scripts.js
This file contains hidden or 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
| /* =================================================== | |
| * Custom Scripts | |
| * =================================================== | |
| */ | |
| $(document).ready(function() { | |
| // Icons für die typolinks | |
| $(".internal-link").prepend('<i class="icon-forward"></i> '); | |
| $(".external-link").prepend('<i class="icon-forward"></i> '); | |
| $(".internal-link-new-window").prepend('<i class="icon-forward"></i> '); | |
| $(".external-link-new-window").prepend('<i class="icon-forward"></i> '); | |
| $(".download").prepend('<i class="icon-arrow-down"></i> '); | |
| $(".mail").prepend('<i class="icon-envelope"></i> '); | |
| // Funktion, damit bei Dropdown-Menus der Toplevel klickbar ist | |
| // sowie das Submenu mit Hoover ausklappt. | |
| // Nicht vergessen, dass im CSS noch der Zusatz kommt: .navbar .dropdown-menu {margin-top: 0px;} | |
| $('ul.nav li.dropdown').hover(function() { | |
| jQuery(this).closest('.dropdown-menu').stop(true, true).show(); | |
| jQuery(this).addClass('open'); | |
| }, | |
| function() { | |
| jQuery(this).closest('.dropdown-menu').stop(true, true).hide(); | |
| jQuery(this).removeClass('open'); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment