This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to overlap two or more <div>s?

 
Ashish Gupta
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to build a multi level navigation bar with help of some javascript and jQuery. But am stuck with some display issue. Specifically the issue is that there are 2 menu bars place horizontally one above other, each enclosed in a <div> element. Initially 2 menubar will remain invisible. On clicking an item, say item1, in the top menu, associated menu bar below should get 'visible' while other menu bars will remain invisible or overlapped. Clicking on second item, say item2, should make the corresponding menu bar visible, overlapping the other one.

Issue I am facing that these 2 menu bars (in 2nd row) are placed stacked vertically instead of overlapping. if I use "style:display=none" then in my javascript I get some error when I try obj.getElementByID(<id>) and nothing seems to function in the javascript.

Here is the Javascript code:


Here is the code segment for top menu bar

PS: Read "href - " as "href =" above

Thanks
Ashish
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashish Gupta wrote:PS: Read "href - " as "href =" above

Please post real code. Check "disable HTML" when posting.

And avoid red.
 
Ashish Gupta
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the snippet of 'real' code. Not sure whether whole script is expected which might be handful.



Some suggestion will be helpful.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic