Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to display a menu above main content?

 
Ranch Hand
Posts: 38
  • 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?
 
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
  • 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).
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic