I assume that your menu has some kind of wrapper, a div perhaps, just use javascript to change the display property of it from none to whatever it normally is. You might want to toggle it so that it can hide/unhide.
Code:
function toggleMenu(){
var menu_cont = document.getElementById("menu_wrapper");
(menu_cont.style.display!='block')?menu_cont.style.display=='block':menu_cont.style.display=='none';}
I have similar requirement to this can you help please
let me explain....
for example....if we right click on an image or a link we get options like open in new window, open in new tab, save link as and etc......
I want this....if I left click on an image it should give me similar drop down where I can include my options like add as friend,,,send message and etc....
I have similar requirement to this can you help please
let me explain....
for example....if we right click on an image or a link we get options like open in new window, open in new tab, save link as and etc......
I want this....if I left click on an image it should give me similar drop down where I can include my options like add as friend,,,send message and etc....
Thanks
There seems to be a ton of problems with detecting mouse clicks on different browsers.
In some cases, the default actions cannot be bypassed even after click has been detected.
I would suggest looking into a different approach to avoid problems to begin with.
For example: Some computers don't have a right button to click on the mouse!
You will not be able to get to any options you define with a right click on those machines.
Search this forum or google for some of the problems associated with "right mouse click".
In particular: http://unixpapa.com/js/mouse.html
actually the things ....i dont want to work on right-click....
I need to work left-click.....if i left-click.....i need a type of fly-out menu with my own options ....similar to the fly-out menu on right-click....
actually the things ....i dont want to work on right-click....
I need to work left-click.....if i left-click.....i need a type of fly-out menu with my own options ....similar to the fly-out menu on right-click....
I hope you have a solution.,.....
Regards
I'm not sure I understand.
What do you want to do differently from what post #4 accomplishes?
Original OP asked for drop down to become visible when an image was clicked,
but the same logic would work for a <span> or <div> tag.
You will need to provide more information for use to solve this problem.
It uses radio buttons rather than a drop down combo box.
I did that to reduce the number of mouse clicks needed to change the images
and it made it easier to hide the selections if the image is clicked a second time as you requested.
That might work if I used JQuery. But I don't, so if it does what you want, GREAT!
I looked over the OLD code (a year or more old) and decided I could do better.
See if this meets your needs...
It uses radio buttons rather than a drop down combo box.
I did that to reduce the number of mouse clicks needed to change the images
and it made it easier to hide the selections if the image is clicked a second time as you requested.
I wanted to learn or at least pick at the code you did. I didn't want to achieve a drop down combo box like that. I wanted to accomplish this: http://onecannon.com/test
however I see that if I click the hide arrow in the Tan Bronzers section the Tan Accelerators opens up (an undesired effect). But it works fine if I click the actual image to open and close the desired section.
EDIT: I saw that I had the 2nd show_hide class labeled the same as the first class.
Last edited by Iso Godly; 03-15-2013 at 06:47 AM..