Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove title attribute
#1
Lightbulb 
Hi,

how can I remove the title attribute in the navigation bar?

Thank you in advance. Smile

Sincerely,
Mark


Attached Files Thumbnail(s)
   
Reply
#2
You have to replace get_navigation by a modified function.
Here's a way:

1. Create a component e.g. my-navigation with this content:
Code:
<?php
    global $pagesArray;
    $menu = '';
    $currentpage = strval(return_page_slug());
    $pagesSorted = subval_sort($pagesArray,'menuOrder');
    if (count($pagesSorted) != 0) {
        foreach ($pagesSorted as $page) {
            $sel = ''; $classes = '';
            $url_nav = $page['url'];
            
            if ($page['menuStatus'] == 'Y') {
                if ("$currentpage" == "$url_nav") { $classes = "current active ". $page['parent'] ." ". $url_nav; } else { $classes = trim($page['parent'] ." ". $url_nav); }
                if ($page['menu'] == '') { $page['menu'] = $page['title']; }
                if ($page['title'] == '') { $page['title'] = $page['menu']; }
                $menu .= '<li class="'. $classes .'"><a href="'. find_url($page['url'],$page['parent']) . '">'.strip_decode($page['menu']).'</a></li>'."\n";
            }
        }
        
    }
    
    echo exec_filter('menuitems',$menu);
?>

2. Edit your template and replace
Code:
get_navigation(return_page_slug());
by
Code:
get_component('my-navigation');
Reply
#3
or js

Code:
$('*[title]').removeAttr('title');
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
Thank you very much! It works perfectly Smile
Reply
#5
(2013-10-15, 01:39:43)shawn_a Wrote: or js

Code:
$('*[title]').removeAttr('title');

Should this also work with an i18n drop menu? I'm trying to remove the title so it doesn't cover up my first drop menu item. I added your line of js in the template surrounded by script tags. I think I am missing something here....
Reply




Users browsing this thread: 1 Guest(s)