Captain09 Posted August 19, 2012 Share Posted August 19, 2012 Hey guys, (my english isn't very good, but I'll try to describe it) I'm looking for a possibility to code a menu which opens/closes, when you click on an arrow at the top of the menu. Anyone has advice? Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/ Share on other sites More sharing options...
Christian F. Posted August 19, 2012 Share Posted August 19, 2012 This is normally done on "mouseover", in which case it's called a "suckerfish menu". If you want to have it happen on "onclick", then I'd recommend looking into the jQuery library. Which will help you show and hide an element, quite easily. Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1370664 Share on other sites More sharing options...
Captain09 Posted August 20, 2012 Author Share Posted August 20, 2012 code for that? Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1370828 Share on other sites More sharing options...
Christian F. Posted August 20, 2012 Share Posted August 20, 2012 Please read this article, do what it says, and then come back. Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1370829 Share on other sites More sharing options...
Captain09 Posted August 20, 2012 Author Share Posted August 20, 2012 I don't want to do this a few times I only need the menu and then I'm finished with ajax Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1370879 Share on other sites More sharing options...
Mahngiel Posted August 20, 2012 Share Posted August 20, 2012 code for that? Your code, monsieur Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1370961 Share on other sites More sharing options...
trq Posted August 21, 2012 Share Posted August 21, 2012 I only need the menu and then I'm finished with ajax Do you know what Ajax is? Nothing in your requirements uses Ajax. Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1371012 Share on other sites More sharing options...
Captain09 Posted August 23, 2012 Author Share Posted August 23, 2012 huh? a guy in ragezone told me it should be done with ajax Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1371783 Share on other sites More sharing options...
Christian F. Posted August 23, 2012 Share Posted August 23, 2012 Then that guy either misunderstood you, or didn't know what he was talking about. Under no circumstance do you need to send a request to the server, to simply just show the menu. A simple function that switches a single CSS property is all that's needed. Don't even need jQuery for it, but it'll make it easier to write (just one line). Link to comment https://forums.phpfreaks.com/topic/267306-ajax-menu-that-opens-if-you-click-on-an-arrow/#findComment-1371844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.