#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0

    Making a submenu appear from a menu option


    Hi

    I am trying to make a submenu appear from a menu option.

    I have started to do it but its not working. I have attached my code to this thread. Can anybody help me?

    [code]


    <script>

    function getPos(y){

    var pos = $y.position(); // returns an object with the attribute top and left
    return;
    }


    function PosofSubmenu(x,y1,z,k){
    x.src=y1;
    x.position="absolute";
    x.top= z + "234px";
    x.left= k + "123px";
    }




    </script>

    <head>


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



    <title>Media</title>

    </head>

    <body>




    <p><img onmouseover="getPos('mediaoption.jpg'); PosofSubmenu(this,'mediamenu.jpg',position.top,position.left)" onmouseout="this.src='mediaoption.jpg';" src="mediaoption.jpg" alt="MediaOption" width="123" height="55" /></p>
    </body>
    </html>
    [code]
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    jquery


    why you jquery ?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0
    Originally Posted by lehuynh
    why you jquery ?

    Hi

    Thanks for that.

    Okay then what do you use?

IMN logo majestic logo threadwatch logo seochat tools logo