Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add element to open submenus for mobile.
- */
- (function($) {
- $(document).ready(function() {
- $('nav.mobile_menu > ul > li.has_sub').each(function() {
- var $submenu = $(this).children('.sub_menu');
- var $link = $(this).children('a');
- var $open = $('<span class="open">></span>');
- $open.css({
- display: 'inline-block',
- float: 'right',
- height: '26px',
- padding: '10px 0px',
- width: '46px',
- 'z-index': '100',
- position: 'absolute',
- right: '0px',
- cursor: 'pointer',
- 'text-align': 'center'
- });
- $open.click(function() {
- $submenu.toggle();
- });
- $open.insertBefore($link);
- });
- });
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement