argyrism Posted June 9, 2010 Share Posted June 9, 2010 hi, i have the following javascript code: function initMenu() { $('#menu ul').hide(); <?php if($catid!="") { $current_id='#a'.$_GET['catid']; //the li's - links have an id of the form a123 where 123 is the category's id ?> //what code to put here and show the current_link; <?php } else { ?> $('#menu ul:first').show(); <?php } ?> $('#menu li a').click( function() { var checkElement = $(this).next(); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } ); } $(document).ready(function() { initMenu(); }); what i want to do is to show the current link without having to click on the ul link, you can see it online at the right menu at : www.tigicy.com/products.php Link to comment https://forums.phpfreaks.com/topic/204253-auto-show-current-li-link/ Share on other sites More sharing options...
haku Posted June 9, 2010 Share Posted June 9, 2010 i have the following javascript code: No, you have a php script. If you want javascript help, you should be posting the javascript. Not the PHP that generates it. Link to comment https://forums.phpfreaks.com/topic/204253-auto-show-current-li-link/#findComment-1069789 Share on other sites More sharing options...
Adam Posted June 9, 2010 Share Posted June 9, 2010 Do you mean onmouseover? Link to comment https://forums.phpfreaks.com/topic/204253-auto-show-current-li-link/#findComment-1069893 Share on other sites More sharing options...
argyrism Posted June 9, 2010 Author Share Posted June 9, 2010 i have a php code to get the passing parameter (catid) and i echo to javascript that parameter . I now started learning javascript and css , i only program in php and mysql . what i want to do is to make the menu to slide where the passing catid is the same as the links catid using javascript. Link to comment https://forums.phpfreaks.com/topic/204253-auto-show-current-li-link/#findComment-1069900 Share on other sites More sharing options...
argyrism Posted June 10, 2010 Author Share Posted June 10, 2010 Guys i have solved the issue, you can see it online at www.maskcy.com/products.php - just click on the menu at the right. Thank you for your help! Link to comment https://forums.phpfreaks.com/topic/204253-auto-show-current-li-link/#findComment-1070188 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.