I have a picture with a section of "actions_image", when a clicked menu shows a hidden menu This image appears several times on the same page. I have problems with the code given below for two reasons:
1 - In the JavaScript code, the first line is to ensure that a menu is already open, close it before the new menu Will be shown. But when this line is added, the second row with the toggle command does not toggle anymore. When you click, it only shows the divis, but when you click again, it will not be hidden; all other actions work completely, like the div is wrapped when anything but the image shows. It is clicked
2 - IE 7 is throwing an error for the second line of JavaScript because of the use: hover and menu will not show at all (grrr ...!)
Can anyone help?
Javascript code:
section_actions_menu: function (event) {$ (".ctions_image"). next (). Hide (); $ ("Actions_image: hover.") Next to () on (); .. Click $ ("Body") (function (e) {if (e.target.className! == "actions_image") {$ ("actions_image"). Next (). Hide ();}});
}
HTML code:
& lt; Img src = "/ media / images / Spacer.gif" width = "31" height = "18" alt = "section actions menu" heading = "section action menu" class = "verb" am "onclick =" section_actions_menu (event); "/> & Lt; Div class = "toggle" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A title = "add" & gt; Add & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A title = "edit" & gt; Edit & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A title = "remove" & gt; Remove & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;
Any help would be greatly appreciated.
You can try (not 'Actions_image'). Click (function () {....}.
Comments
Post a Comment