API
jQuery Modal Window Controller
Public variables
- mwc.settings
The settings, which underlies the jQuery Modal Window. It is not yet possible to change settings on the fly. - mwc.modal
The actual modal window jQuery object - mwc.modalContent
Modal window’s contents. The content you choose to display. - mwc.background
The background behind the modal window. Often called the sandwich paper. - mwc.block
jQuery Modal Window container that contains both modal and background
Public methods
- mwc.fireResizeModal (modalCss, ignoreStartEvent, noAnimate)
This method starts a recalculation and location of the modal window.
modalCss allows you to send your own measures for the window’s size and placement. ignoreStartEvent will force jQuery Modal Window to NOT fire the onModalResize event, if set to true. noAnimate will ignore any animation when modal window resizes. - mwc.calculateModalCSS ()
This method calculates the position and position of the modal window. Can be used to get the exact dimensions of how large your content may be.
returns a modalCss. - mwc.deconstruct ()
Closes and removes jQuery Modal Window. - mwc.getScrollBarWidth ()
Returns the size of the browser’s scrollbar width.
jQuery Modal Window plugin API
- jQuery.fn.openModalWindow (settings)
This method opens a particular content in a new jQuery Modal Window. - jQuery.fn.closeModalWindow ()
When called on any element inside the jQuery Modal Window’s block element it will deconstruct the jQuery Modal Window. - jQuery.fn.updateModalWindow (modalCss, ignoreStartEvent)
When called on any element inside the jQuery Modal Window’s block element it will calculate a new size and position and change the jQuery Modal Window. - jQuery.fn.getModalWindowControl ()
This method is new and if it’s called on any element inside the jQuery Modal Window’s block element it will return the jQuery Modal Window controller object.
Settings
onOpen
onOpen event, firing as soon as you open a jQuery Modal WindowType: function
Value: function (content) ()
onOpened
onOpened event, firing once the plugin has opened a jQuery Modal WindowType: function
Value: function (content) ()
onClose
onClose event, firing as soon as you close a jQuery Modal WindowType: function
Value: function (content) ()
onClosed
onClosed event, firing once the plugin has closed the jQuery Modal WindowType: function
Value: function (content) ()
backgroundOpacity
The transparency of the background which lies behind jQuery Modal Window.type: float
Value: 0.8
backgroundBackground
The background color or image of the background.type: css background value
Value: ‘# 000′
minDistanceToViewport
The margin from the jQuery Modal Window to the edge of the browser window.Type: integer
Value: 0
zIndex
The z-index position the jQuery Modal Window should be placed in.Type: integer
Value: 999
animateTime
The time in milliseconds it takes for jQuery Modal Window to animate into and out of existence.Type: integer
Value: 500
closeOnBlockClick
Boolean value indicating whether jQuery Modal Window should close when clicking on the background.Type: boolean
Value: true
fixedTop
The absolute location of the jQuery Modal Window from the top of your browser window.type: integer (null if no value desired)
Value: null
fixed Left
The absolute location of jQuery Modal Window from your browser window left side.type: integer (null if no value desired)
Value: null
dansk version
Twitter
LinkedIn