Results 1 to 3 of 3

Thread: return menu item target URL in AnyLink CSS Menu v2.3

  1. #1
    Join Date
    Apr 2015
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default return menu item target URL in AnyLink CSS Menu v2.3

    AnyLink CSS Menu v2.3
    http://www.dynamicdrive.com/dynamici...anylinkcss.htm

    The script works great - I'd just like to get more out of it.

    I have AnyLink CSS set up to navigate the page it is on.

    What I would like to do is apply style to the target of the menu item; so when I click on a menu item,
    the target will stand out from the rest of the page.

    The closest I've managed to get to even finding where I might be able to grab the target URL
    is from a console.log(menu); instance below line #259 in anylinkcssmenu.js

    // CLICK event for anchor, dropmenu

    I then found it at six places in the console results
    ownerDocument: documentURL: "http://rler.net/div-stributors.html#NE"
    It's there, I just don't know how to get it
    Last edited by Carpintonto; 04-20-2015 at 12:47 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Add the highlighted code in the head of the page as shown:

    Code:
    		<script src="js/jquery.min.js"></script>
    		<script src="js/jquery.scrolly.min.js"></script>
    		<script src="js/jquery.scrollzer.min.js"></script>
    		<script src="js/skel.min.js"></script>
    		<script src="js/skel-layers.min.js"></script>
    		<script src="js/init.js"></script>
    
    <script type="text/javascript">
    $(document).click(function(){
    	$('.container').find('*').removeClass('navigated');
    	setTimeout(function(){
    		$(location.hash).addClass('navigated');
    	}, 250);
    });
    </script>
    
    <link rel="stylesheet" type="text/css" href="css/anylinkcssmenu.css" />		
    <script type="text/javascript" src="js/anylinkcssmenu.js">
    
    /***********************************************
    * AnyLink CSS Menu script v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm for full source code
    ***********************************************/
    
    </script>
    Now, each time you navigate via the anylink menu to any of the items on the page, they will have the class 'navigated'. Also, any previous item in the container div will have that class removed if it had it.

    So all you need to do is add something like so to the stylesheet:

    Code:
    .navigated {
    	background-color: white;
    }
    Or whatever rule(s) you want in there for highlighting the .navigated class.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Carpintonto (04-12-2015)

  4. #3
    Join Date
    Apr 2015
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thank you John!

    works like a charm

Similar Threads

  1. AnyLink: Text input menu item?
    By bd32 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-16-2009, 06:12 PM
  2. Replies: 7
    Last Post: 04-11-2009, 05:46 AM
  3. glossy accordion menu: how to highlight current menu item on target page?
    By gargiulo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-18-2009, 02:31 PM
  4. AnyLink CSS Vertical problem with the first menu item
    By Jim R in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 12-23-2007, 07:53 PM
  5. Anylink Vertical Menu - 2nd menu item not showing mouseover links
    By Marva in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 11-20-2007, 08:11 PM

Bookmarks

Posting Permissions

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