Turning tips into memories
‘); subMenuHolder = jQuery(“.bn-sub-navigation #submenu-” + submenuId); var data = testData[submenuId], hasMain = (typeof data.mainFilters != “undefined” && data.mainFilters.length > 0), hasMore = (typeof data.moreFilters != “undefined” && data.moreFilters.length > 0), hasTrailers = (typeof data.trailers != “undefined” && data.trailers.length > 0); // main filters empty if(!hasMain) return; // TPL var tpl = ”, createLink = function(lable, url){ return ‘‘ + lable + ‘‘; }, createTrailer = function(trailer){ return ‘
‘; }, createBanner = function(targeting){ var tg = (targeting) ? ‘data-targeting=\” + JSON.stringify(targeting) + ‘\” : ”; var banner_html = ‘
‘; return banner_html; }, createMain = function(){ if(!hasMain) return ”; var result = ‘
‘; // create filter list result += ‘
‘; for(var i in data.mainFilters) { if(!data.mainFilters.hasOwnProperty(i)) continue; var item = data.mainFilters[i]; if(item.is_visible == 1){ result += createLink(item.label, item.url,item.is_visible); } } if(hasMore) result += ‘more‘; result += ‘
‘; // end filter list // create trailers if(hasTrailers) { for(var i1 in data.trailers) { if(!data.trailers.hasOwnProperty(i1)) continue; if(i1 == 2) { result += createBanner(data.targeting); } var trailer = data.trailers[i1]; result += createTrailer(trailer); } } // end trailers result += ‘
‘; result += ‘
‘; return result; }, createExtra = function(){ if(!hasMore) return ”; var result = ‘
‘; for(var i in data.moreFilters) { if(!data.moreFilters.hasOwnProperty(i)) continue; var item = data.moreFilters[i]; if(item.is_visible == 1) { result += createLink(item.label, item.url); } } result += ‘
‘; result += ‘
‘; return result; }; tpl += createMain(); if(hasMore) tpl += createExtra(); subMenuHolder.html(tpl); // more button jQuery(“#submenu-” + submenuId + ” .sub-more”).on(‘click’, function() { var t = jQuery(this); var extra = jQuery(‘#submenu-‘ + submenuId + ‘ .sub-col-extra’); t.toggleClass(‘active’); extra.toggleClass(‘active’); return false; }); } jQuery(‘.bn-sub-navigation #submenu-‘ + submenuId + ‘ .sub-col-extra’).removeClass(‘active’); jQuery(‘.bn-sub-navigation #submenu-‘ + submenuId + ‘ .sub-more’).removeClass(‘active’); subMenu.show(); subMenuHolder.show(); }; window.updateSubMenuPosition = function(){ mainMenuEndPoint = topNav.position(); mainMenuHeight = topNav.outerHeight(); subMenu.css(‘position’, ‘absolute’); subMenu.css(‘top’, mainMenuEndPoint.top + mainMenuHeight); }; //init scroll control var locationPath = document.location.pathname.split(‘/’); if(locationPath[1] != ‘admin’) { var block = jQuery(‘#one-line-nav-block’), navBar = jQuery(‘#nav-bar’), navLoginButtons = jQuery(‘#nav-login-buttons’), searchBar = jQuery(‘.top-nav .search-bar’), scrollPosition = jQuery(window).scrollTop(), windowWidth = jQuery(window).width(), topNav = jQuery(“.top-nav”), subMenu = jQuery(“.bn-sub-navigation”), subMenuIsDev = false, timeoutHideMenuTime = 300, timeoutHideMenu; block.find(‘.centered’).append(navBar.clone()); block.find(‘.one-line-nav’).append(navLoginButtons.clone()); block.find(‘.one-line-nav’).append(searchBar.clone()); // // sub menu // var mainMenuEndPoint = topNav.position(), mainMenuHeight = topNav.outerHeight(); // subMenu.css(‘position’, ‘absolute’); // subMenu.css(‘top’, mainMenuEndPoint.top + mainMenuHeight); window.updateSubMenuPosition(); if(subMenuIsDev) subMenu.addClass(‘active’); // add arrows jQuery(‘.with-submenu’).append(‘‘); if(windowWidth > 1024) { var openedSubMenuId; jQuery(‘.b-nav-new a[data-submenu]’).hover(function(){ clearTimeout(timeoutHideMenu); var t = jQuery(this), subMenuId = t.data(‘submenu’); // createSubMenu generateSubmenu(subMenuId); if(t.parents(‘.one-line-nav’).length === 0) window.updateSubMenuPosition(); jQuery(‘.b-nav-new a[data-submenu=’ + openedSubMenuId + ‘]’).removeClass(‘opened’); openedSubMenuId = subMenuId; jQuery(‘.b-nav-new a[data-submenu=’ + openedSubMenuId + ‘]’).addClass(‘opened’); subMenu.addClass(‘active’); // window.updateSubMenuPosition(); if(typeof window.bannerClass !== ‘undefined’) window.bannerClass.findAndInit(); }, function(){ timeoutHideMenu = setTimeout(function(){ if(!subMenuIsDev) { subMenu.removeClass(‘active’); subMenu.hide(); jQuery(‘.b-nav-new a[data-submenu=’ + openedSubMenuId + ‘]’).removeClass(‘opened’); } },timeoutHideMenuTime); }); subMenu.hover(function(){ clearTimeout(timeoutHideMenu); },function(){ timeoutHideMenu = setTimeout(function(){ if(!subMenuIsDev) { subMenu.removeClass(‘active’); subMenu.hide(); jQuery(‘.b-nav-new a[data-submenu=’ + openedSubMenuId + ‘]’).removeClass(‘opened’); } },timeoutHideMenuTime); }); } // mobile submenu else { jQuery(document).on(‘click touchend’, ‘.with-submenu .mobile-arrow’, function(){ var t = jQuery(this), li = jQuery(t.parent()), nav = t.parents(‘.b-nav-new’); if(!li.hasClass(‘opened’)) { var opened = jQuery(‘.with-submenu.opened’, nav); if(opened.length > 0) { jQuery(‘.b-nav-new .nav-list li a.disabled’).removeClass(‘disabled’); opened.removeClass(‘opened’); } li.addClass(“opened”); jQuery(‘.b-nav-new .nav-list>li[class!=”with-submenu opened”] a[class!=”mobile-arrow”]’).addClass(‘disabled’); } else { jQuery(‘.b-nav-new .nav-list li a.disabled’).removeClass(‘disabled’); li.removeClass(‘opened’); } return false; }); } // // end sub menu // scrollControl(windowWidth, scrollPosition, block, subMenu, topNav); jQuery(window).scroll(function () { var scrollPosition = jQuery(window).scrollTop(), windowWidth = jQuery(window).width(); scrollControl(windowWidth, scrollPosition, block, subMenu, topNav); }); jQuery(window).resize(function(){ var windowWidth = jQuery(window).width(); if(windowWidth
Get the Best of London Life, Culture and Style
There’s something magical about London’s live theatre especially if it means the chance to see celebrities on the West End. When there’s the perfect symbiosis between sizzling script and super hot star, we want to be in the front seats, watching – annoyingly, so does everyone else.
For a star safari, here’s the shows to book fast, before the herds of superfans!
Share this:
- Click to share on Facebook (Opens in new window)
- Click to share on Reddit (Opens in new window)
- Click to share on Twitter (Opens in new window)
- Click to email a link to a friend (Opens in new window)
- Click to share on Pinterest (Opens in new window)
- Click to share on Tumblr (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to share on Pocket (Opens in new window)
- Click to print (Opens in new window)