For my personal use, I am developing a small drop down menu with HTML, CSS and jquery. When I run the script, then the menu comes and goes. There is some minor mistake that I cannot understand. Here is my code. Can someone take a look and tell me how to fix this.
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> a#plinkp { background: #CCC; padding: 10px; cursor: pointer; margin-left: 600px; margin-top: 200px; position: absolute; } a#testll { background: #CCC; padding: 10px; cursor: pointer; margin-left: 600px; margin-top: 250px; position: absolute; } div#HoverSubmenu { background: #fff; position: absolute; top: -12px; left: -20px; z-index: 100; width: 165px; display: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); border:5px solid; border-color:#F1F2F2; z-index:9999; } div#HoverSubmenu li a { color: #555555; display: block; font-family: arial; font-weight: bold; padding: 6px 15px; cursor: pointer; text-decoration: none; } div#HoverSubmenu li a:hover { background: #39B54A; color: #FFFFFF; text-decoration: none; } .HoverRoot { list-style: none; margin: 0px; padding: 0px; padding: 11px 0 0 0px; border-top: 1px solid #dedede; } </style> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('[id*=link]').click(function () { </script> </head> <body> <form id="form1" runat="server"> <a id="plinkp">About</a> <a id="testll">My Test</a> <%--Hover UPS Menu start--%> <div id="HoverSubmenu"> <ul class="HoverRoot"> <li class="HoverLI"><a class="atag" href="http://www.bba-reman.com">Ship with UPS</a></li> <li class="HoverLI"><a class="atag" href="http://www.bba-reman.com">Ship with FedEx</a></li> </ul> </div> <%--Hover UPS Menu end--%> </form> </body> </html>
jquery
Mou Mar 26 '13 at 10:55 2013-03-26 10:55
source share