Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2012
    Posts
    142
    Thanks
    112
    Thanked 0 Times in 0 Posts

    Trying to do "NO PAGE Reload" on navbar...?

    I have a vertical navbar on a page.

    1) I wanted to get rid of the "hand" when hovering over the "parent" so it would only show when hovering over the "child selections".

    Did that with this #noCursor {cursor: default;}

    BUT is there a way so that I do not get a page load whe the parent is clicked?

    Reason: The navbar is down a bit on the page, and reloads are annoying.

    Thanks, Eggweezer

    My Page.... http://lpulaguna.com

  • #2
    Regular Coder dan-dan's Avatar
    Join Date
    Aug 2009
    Location
    England
    Posts
    483
    Thanks
    22
    Thanked 79 Times in 78 Posts
    Just take away the href part. Ie:
    <a id="noCursor">Pools & Spas</a>.

  • Users who have thanked dan-dan for this post:

    Eggweezer (05-22-2012)

  • #3
    Regular Coder
    Join Date
    May 2012
    Posts
    142
    Thanks
    112
    Thanked 0 Times in 0 Posts
    Too cool! Thank you Dan-Dan. Makes sense,too.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    An even better way would be to replace it with a span

    <span id="noCursor">Pools & Spas</span>

    the use of <a> tags as destinations for links as well as for the links themselves became obsolete with Netscape 4. Netscape 4 required a name on the <a> tag to use as the destination - more modern browsers can use an id on any tag in the body at all.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    Eggweezer (05-22-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •