The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Position dropdown menues using jquery

  • # December 9, 2009 at 1:29 am

    Hi how do I get the width and height of an element and then use it position a dropdown menu… if I use css the same rule doesn’t seem to work in ie and since I anyway need jquery I might as well use it.


    # December 9, 2009 at 2:13 am

    This reply has been reported for inappropriate content.

    What I would do is store it in a var.

    var itemWidth = $("myElement").width();
    var itemHeight = $("myElement").height();

    that should get you your values stored in "itemWidth" and "itemHeight"

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed