Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic Floating window by javascript

I want to build a dynamic floating window with close button at corner. Is it possible, and also i want to add some content dynamically into that window.

Please help me.. It should be in javascript.. Better without AJAX..

Thanks in Advance

like image 591
praveenjayapal Avatar asked Dec 19 '08 06:12

praveenjayapal


2 Answers

jQuery UI has an awesome floating window. What's cool about the jQuery UI version is that you can also package it with the UI theme manager, which means less time styling.

Check it out here : jQuery UI Dialog examples

All it takes is creating a container (probably a div), and one line of code. Something like this:

<div id="example">I'm in a dialog!</div>
$("#example").dialog();

Here's the documentation: jQuery UI Dialog documentation

like image 74
Jack Lawson Avatar answered Nov 15 '22 01:11

Jack Lawson


What you are looking for is called a "lightbox" technique. Here is a comparison of many lightbox techniques.

Many exist out there on the web, here are some for jquery and prototype libs:

Also, check out the wikipedia article on lightbox.

like image 22
willoller Avatar answered Nov 15 '22 00:11

willoller