var page = $('body'),
dropdown = page.find( $('ul#menu-top-main')),
nav_links = page.find( $(dropdown).children('li').children('a') );
- nav_links.each(function(){
- $(this).on('click', function(e){
- e.preventDefault();
- return false;
- });
- });
- nav_links.each(function(){
- $(this).hover(
- function(){
- $(this).css('cursor', 'default');
- },function(){
- }
- );
+
+ var topbar_menu_items = page.find( $(dropdown).children('li') );
+ var offcanvas_menu_items = page.find(".left-off-canvas-list > ul").children('li');
+
+ // disable the links for top nav items that have subpages
+ topbar_menu_items.each( function () {
+ if ( $(this).hasClass("menu-item-has-children") ){
+ $(this).css('cursor','default');
+ $(this).children("a").each ( function() {
+ $(this).css('cursor', 'default');
+ });
+ $(this).children("a").on('click', function(e){
+ e.preventDefault();
+
+ });
+ }
+ });
+
+ // disable the links for off canvas nav items that have subpages
+ offcanvas_menu_items.each( function () {
+ if ( $(this).hasClass("menu-item-has-children") ){
+ $(this).css('cursor','default');
+ $(this).children("a").on('click', function(e){
+ e.preventDefault();
+ });
+ }
});
var event_feed = $("#feed");
var page = $('body'),
dropdown = page.find( $('ul#menu-top-main')),
nav_links = page.find( $(dropdown).children('li').children('a') );
- nav_links.each(function(){
- $(this).on('click', function(e){
- e.preventDefault();
- return false;
- });
- });
- nav_links.each(function(){
- $(this).hover(
- function(){
- $(this).css('cursor', 'default');
- },function(){
- }
- );
+
+ var topbar_menu_items = page.find( $(dropdown).children('li') );
+ var offcanvas_menu_items = page.find(".left-off-canvas-list > ul").children('li');
+
+ // disable the links for top nav items that have subpages
+ topbar_menu_items.each( function () {
+ if ( $(this).hasClass("menu-item-has-children") ){
+ $(this).css('cursor','default');
+ $(this).children("a").each ( function() {
+ $(this).css('cursor', 'default');
+ });
+ $(this).children("a").on('click', function(e){
+ e.preventDefault();
+
+ });
+ }
+ });
+
+ // disable the links for off canvas nav items that have subpages
+ offcanvas_menu_items.each( function () {
+ if ( $(this).hasClass("menu-item-has-children") ){
+ $(this).css('cursor','default');
+ $(this).children("a").on('click', function(e){
+ e.preventDefault();
+ });
+ }
});
var event_feed = $("#feed");