Note that there are some explanatory texts on larger screens.

plurals
  1. POhighlighting default page current menu on a navigation bar
    primarykey
    data
    text
    <p>I do not succeed in highlighting my default web page, that is e.g: www.mydomain.com. When it's redirected to index.php and other menu links it's fine, when it's plain domain with no other files I CAn't. I wrote following Jquery just to enlarge the font size of the link and bring it to a white color:</p> <pre><code>$(function () { var path = window.location.href; path = decodeURIComponent(path); path =path.substr(path.lastIndexOf("/") +1); $('#menu a').each(function () { var href = $(this).attr('href'); href=href.substr(href.lastIndexOf("/") +1); if (href.indexOf(path) != -1 &amp;&amp; path != "") { $(this).closest('li').find('a').css({'color': 'white' , 'font-size' : '18px' }); } }); //end of each function }); </code></pre> <p>HTML markup is:</p> <pre><code> &lt;div id="menu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="$doc_root/index.php" title="Home Page"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="$doc_root/travel/grid.php" title="My Trips"&gt;travelling&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;images&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;words&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;about&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>How can I change my first link menu "Home" to be new font and color when only the domain name is written (www.mydomain.com) ? I want it to be highlighted as like as index.php is selected. Thks a lot. M P.S. no matter about redirecting the domain name directly to index.php (I generally know how to do it, I don't know how to do it with Aruba) and I'm looking for a nice "programming" solution though.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload