• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display a menu above main content?

 
Manas Saxena
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a social networking site wherein i have an href link ,clicking on which i want to display some names which i will be retrieving from my db.
For example:in facebook,when we click on the number of likes, a menu pops up above all the content which displays who all liked our picture,and we cant scroll or click on the main content unless we close this menu.I want exactly the same thing.

Any suggestion?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The key word to search for is "modal". There are many JavaScript "widgets" that exhibit modal behavior, such as jQuery UI Dialog.
 
Manas Saxena
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using dialog modal of this link
jqueryui.com/dialog/#animated


but i am facing the following problem.

Each different post should have this open dialog button (the button shown in the above link).Thus i am putting the div dialog tag in a for loop due to which when i click any one of the open dialog button then as many dialog box open as the number of buttons i have displayed .(i have tried assigning each button a different id [i assigned the loop variable as id,so that each iteration brings a new id and subsequently a new button] but didnt have any effect).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic