I like the look of the link dialog here. It darkens the screen and is probably modal (although I haven't tested that I just assume it is). What's a quick and easy way of darkening the screen like that witha jQuery UI Dialog?
jQuery dialog that darkens the screen like the link dialog does here
8.1k Views Asked by cletus At
2
There are 2 best solutions below
2
Julian
On
One way to do it is to have a div at z-order > 1 which covers the whole screen at less than 100% opacity
HTML:
<div id="cover> </div>
CSS:
#cover {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
display: none;
background-color: #000000;
opacity: .7;
filter:progid:DXImageTransform.Microsoft.BasicImage(opacity=.7);
}
Then you can show the cover when you show your dialog, which needs to be at a yet higher z-index and remove the cover at the same time as your dialog:
Open:
$("#cover").show();
$("#fileupload").show( "slow" );
Close:
$("#fileupload").fadeOut( "slow" );
$("#cover").hide();
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in JQUERY
- How to sort these using Javascript or Jquery Most effectively
- Ajax jQuery firing multiple time display event for the same result
- .hover() seems to overwrite .click()
- Check for numeric value with optional commas javascript
- Extending Highmaps Side Effect
- Array appending after each onclick and loop in javascript
- how can i append part of a table based on how many tr it has?
- Play multiple audio files in a slider
- Remove added set of rows
- Access property of an object of type [Model] in JQuery
- AJAX PHP - Reload div after submit
- proengsoft/laravel-jsvalidation ReferenceError: jQuery is not defined
- when a checkbox is checked how to display a different hidden element using javascript
- Get jquery error Uncaught RangeError: Maximum call stack size exceeded
- Removing only the closest thead on table filtering
Related Questions in CSS
- CSS Class is not applying to element (border width,color,and style attributes)
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
- Positioning child at bottom of parent with scroll
- Play multiple audio files in a slider
- How to set text over image?
- Website zoomed out on Android default browser
- Writing/Overwriting to specific XML file from ASP.NET code behind
- My navbar is not expanding after collapse
- when a checkbox is checked how to display a different hidden element using javascript
- Gaps Vertically Using Dividers
- CSS: Preventing a property to affect on element until the end of transition
- Polygon Button with pure CSS
- transform-origin doesnt apply in safari
- show/hide multiple div tags at once and change the size of the remaining div tag
- Mask the image/maps/div (circle) using css and jquery
Related Questions in JQUERY-UI
- Uncaught TypeError: undefined is not a function
- Stop siblings replacing order of canceled element with jQuery-ui
- jQuery mobile Multiselect doesn't update selected attribute
- jQuery autocomplete display worng search item
- List of conflicts between bootstrap and jquery-ui?
- Creating boundries in JQuery/javascript
- Having trouble focusing on the TAB that I was currently working on
- How can i show a jquery menu which opens from right to left side?
- Can't toggle from right to left Jquery
- undefined new items appear while reordering a list with ui-sortable and angularJS
- Jquery Mobile: Horizontal Buttons, fill container
- Is it possible to override defined options of the jQuery-ui sortable widget?
- Quick way to clear only option available list on a multiselect with jQuery?
- How to inject html into iframe, and display inside jquery-ui dialog
- Show embedded select box on overflow, out of popup container
Related Questions in JQUERY-1.3
- Can any .livequery() code be written with an equivalent .delegate() code in jQuery?
- When was .on() introduced to jQuery?
- Having trouble submitting form and calling queued events after asynchronous event
- jQuery: running success in 1.3.2 but not in 1.4.2
- JQuery is waiting for images to load before executing document.ready
- JQuery event.target error
- More efficent method of styling alternating blocks of table rows with jQuery?
- Finding all classes that match a pattern in an HTML document?
- jQuery dialog that darkens the screen like the link dialog does here
- Change height in jquery only working once
- Selecting all empty text fields in Jquery
- strange behavior when using jQuery fadeOut function on element with floated element and absolutely positioned element
- Why does this increment/decrement code work with jquery 1.3 and not with 1.6?
- parse variable as JSON w/ jQuery
- jQuery with ASP.NET WebForms - disabling textboxes
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The functionality you're talking about is provided by the WYSIWYM Markdown Editor
To do it with jQuery UI's dialog, try this:
It's not exactly the same by default, but I think it's even prettier. ;)
http://ui.jquery.com/demos/dialog/#modal