
NyroModal :: jQuery Plugin
This page documents nyroModal v1. This version is not supported and maintened anymore.
Please go to the current page of the project to learn about nyroModal v2.
Edito
Designers seem to like using modal windows more and more, as they provide a quick way to show
data without reloading the entire page. It's easy to use and easy to design.
The big problem I experienced with every plugin I tried either using Prototype/Scriptaculous
or jQuery is the customization. They say you can do whatever you want simply but that's not
fully true. The default CSS works fine, but most of time it's a mix between required elements
and optional. That mean you have to be very careful when editing it.
The other problem is the animation. That's the worst point. I never found one plugin
allowing to redefine easily the animations.
I tried to solve these problems with my plugin. I documented everything possible. The default CSS
contains only optional rules. Without it, the plugin will works perfectly —but will also looks
very sad. Regarding the animations, you can simply redefine them from A to Z. Thanks to the useful
jQuery function like animate, fadeTo or the future enchant, it's pretty simple.
Moreover, I added the ability to define many callbacks at different time in the process to allow
you to edit the settings, the data or do whatever you need.
Enough talk, let's try it and learn it!
Features
- Ajax Call
- Ajax Call with targeting content
- Ajax call can change the modal size
- Single Image
- Images Gallery with arrow navigating
- Gallery with any kind of content
- Form
- Form in iframe
- Form with targeting content
- Form with file upload
- Form with file upload with targeting content
- Dom Element
- Manual Call
- Iframe
- Error handling
- Modal will never goes outside the view port
- Esc key to close the window
- Customizable animation
- Customizable look
- Modal title
- Ability to block only one element
- W3C valid HTML (Transitionnal)
Demos
Show All Codes
Ajax
Ajax Filtering Content #test
Ajax Filtering Content #blabla
<a href="demoSent.php" class="nyroModal">Ajax</a> <a href="demoSent.php#test" class="nyroModal">Ajax Filtering Content #test</a> <a href="demoSent.php#blabla" class="nyroModal">Ajax Filtering Content #blabla</a>
<a href="demoSent.php" class="nyroModal" rev="modal">Ajax without closing</a>
<a href="img/img2.jpg" class="nyroModal" title="3rd Street Promenade">Image</a>
Gallery Img 1
Gallery Img 2
Youtube in gallery
Gallery Img 3
<script type="text/javascript"> $(function() { $.nyroModalSettings({ processHandler: function(settings) { var from = settings.from; if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=') == 0) { $.nyroModalSettings({ type: 'swf', height: 355, width: 425, url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/') }); } } }); }); </script> <a href="img/img1.jpg" id="imgFiche" class="nyroModal" title="UCLA" rel="gal">Gallery Img 1</a> <a href="img/img2.jpg" class="nyroModal" title="3rd Street Promenade by Night" rel="gal">Gallery Img 2</a> <a href="http://www.youtube.com/watch?v=lddUnv1R5y0" class="nyroModal" rel="gal" title="Hockey Goal fight">Youtube in gallery</a><br /> <a href="img/img3.jpg" class="nyroModal" title="Sunset at Santa Monica" rel="gal">Gallery Img 3</a>
<a href="#test" class="nyroModal">DOM Element (hidden div)</a> <div id="test" style="display: none; width: 600px;"> <a href="demoSent.php" class="nyroModal">Open a new modal</a><br /> Test </div>
<script type="text/javascript"> $(function() { $.nyroModalSettings({ processHandler: function(settings) { var from = settings.from; if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=') == 0) { $.nyroModalSettings({ type: 'swf', height: 355, width: 425, url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/') }); } } }); }); </script> <a href="http://www.youtube.com/watch?v=lddUnv1R5y0" class="nyroModal">Youtube Via Process Handler</a>
Manual Call
Manual Call to get an ajax content
Manual Call calling through an other link
<script type="text/javascript"> $(function() { $('#manual').click(function(e) { e.preventDefault(); var content = 'Content wrote in JavaScript<br />'; jQuery.each(jQuery.browser, function(i, val) { content+= i + " : " + val+'<br />'; }); $.nyroModalManual({ bgColor: '#3333cc', content: content }); return false; }); $('#manual2').click(function(e) { e.preventDefault(); $.nyroModalManual({ url: 'demoSent.php' }); return false; }); $('#manual3').click(function(e) { e.preventDefault(); $('#imgFiche').nyroModalManual({ bgColor: '#cc3333' }); return false; }); $('#myValidForm').submit(function(e) { e.preventDefault(); if ($("#myValidForm :text").val() != '') { $('#myValidForm').nyroModalManual(); } else { alert("Enter a value before going to " + $('#myValidForm').attr("action")); } return false; }); }); </script> <a id="manual" href="#">Manual Call</a> <a id="manual2" href="#">Manual Call to get an ajax content</a> <a id="manual3" href="#">Manual Call calling through an other link</a> <form id="myValidForm" method="post" action="demoSent.php"> <input type="text" name="wouhou" /> <input type="submit" value="simple form with validation" /> </form>
Automatic Iframe via other hostname
Automatic Iframe via target=_blank
<a href="http://www.perdu.com/" class="nyroModal">Iframe Automatique via other hostname</a> <a href="demoIframe.php" target="_blank" class="nyroModal">Iframe Automatique via target=_blank</a>
<form method="post" action="demoSent.php" class="nyroModal"> <input type="text" name="wouhou" /> <input type="submit" value="simple form"/> </form> <form method="post" action="demoSent.php" class="nyroModal" target="_blank"> <input type="text" name="wouhou" /> <input type="submit" value="simple form in iframe"/> </form> <form method="post" action="demoSent.php#test" class="nyroModal"> <input type="text" name="wouhou" /> <input type="submit" value="simple form Filtering Content"/> </form>
<form method="post" enctype="multipart/form-data" action="demoSent.php" class="nyroModal"> <input type="file" name="file" /> <input type="submit" value="form with file"/> </form> <form method="post" enctype="multipart/form-data" action="demoSent.php#blabla" class="nyroModal"> <input type="file" name="file" /> <input type="submit" value="form with file Filtering Content"/> </form>
<div id="blocker"></div> <a href="demoSent.php" id="block">blocker Modal</a> <script type="text/javascript"> $(function() { $('#block').nyroModal({ 'blocker': '#blocker' }); });
Non existent URL
Non existent Image
Non existent Element ID
Non existent Element ID in Ajax Request
<a href="invalidUrl.php" class="nyroModal">Non existent URL</a><br /> <a href="invalidUrl.jpg" class="nyroModal">Non existent Image</a><br /> <a href="#inexistent" class="nyroModal">Non existent Element ID</a><br /> <a href="demoSent.php#inexistent" class="nyroModal">Non existent Element ID in Ajax Request</a>
Preloading Images is not considered to be a part of the plugin, as you probably need to preload other images for your website.
If you need to do so, you can use this code.
<script type="text/javascript"> $(function() { function preloadImg(image) { var img = new Image(); img.src = image; } preloadImg('img/ajaxLoader.gif'); preloadImg('img/prev.gif'); preloadImg('img/next.gif'); }); </script>
Usage
The plugin provide some function to work with it:
- nyroModal(); is the basic function to set the click or submit function. To add the nyroModal functionnality to all links containing in #container, you'll do:
$('#container a').nyroModal();
Pretty long, right? As all jQuery plugin, the chain is not broken. That mean you can use it like all other jQuery functions. You can also set the settings as an object paramter to overwrite the default parameter. - nyroModalManual(); will execute the same action like a click in a real link. You can simulate an user click or create your modal content. See demos to better understand.
- $.nyroModalSettings(settings); could be used to change the default settings if no modal are started or the current settings if a modal is currently shown. For example, it will be pretty useful to change the modal size or background color from an Ajax request. If you call this function with the width, height, and/or bgColor parameters while the modal is already shown, the related animation function will be called.
- $.nyroModalRemove(); will simply remove the modal. Could be useful if you need to close after a time or something else.
When using the gallery modal, you can also use these functions:
- $.nyroModalNext(); Go to the next image. Return the link which opened the image if successful or false if nothing was done
- $.nyroModalPrev(); Go to the previous image. Return the link which opened the image if successful or false if nothing was done
When you open a modal using an Ajax request, the scripts included in the loaded page are executed folowing these rules:
- If the modal is a targeting content, only the scripts inside this element are executed
- If the modal isn't targeting:
- All the inline script are executed
- The scripts with a src attribute to load a javascript file are loaded only if they are the attribute rel="forceLoad". This avoid the reload of jQuery for example
If you need to investigate what's going on with your modal, you could enable the debug. But sometimes, it's not enough and you want more. You could overwrite the function nyroModalDebug(msg, elts, settings); to do what ever you want!
Settings
You have 3 different ways to modify the settings:
- Directly modify $.fn.nyroModal.settings. These settings will be used by default for every modal which will be open
-
Set at first parameter to the nyroModal(); function. Example:
$('a.nyroModal').nyroModal({bgColor: '#ffffff'});
- Use the $.nyroModalSettings(settings); function
Here is the complete usable settings list, with their default values.
$.fn.nyroModal.settings = { debug: false, // Show the debug in the background blocker: false, // Element which will be blocked by the modal windowResize: true, // indicates if the modal should resize when the window is resized modal: false, // Esc key or click backgrdound enabling or not type: '', // nyroModal type (form, formData, iframe, image, etc...) forceType: null, // Used to force the type from: '', // Dom object where the call come from hash: '', // Eventual hash in the url processHandler: null, // Handler just before the real process selIndicator: 'nyroModalSel', // Value added when a form or Ajax is sent with a filter content formIndicator: 'nyroModal', // Value added when a form is sent content: null, // Raw content if type content is used bgColor: '#000000', // Background color ajax: {}, // Ajax option (url, data, type, success will be overwritten for a form, url and success only for an ajax call) swf: { // Swf player options if swf type is used. wmode: 'transparent' }, width: null, // default Width If null, will be calculate automatically height: null, // default Height If null, will be calculate automatically minWidth: 400, // Minimum width minHeight: 300, // Minimum height resizable: true, // Indicate if the content is resizable. Will be set to false for swf autoSizable: true, // Indicate if the content is auto sizable. If not, the min size will be used padding: 20, // padding for the max modal size regexImg: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', // Regex to find images addImageDivTitle: false, // Indicate if the div title should be inserted defaultImgAlt: 'Image', // Default alt attribute for the images setWidthImgTitle: true, // Set the width to the image title ltr: true, // Right to left by default. Put to false for Hebrew or Left to Right language gallery: null, // Gallery name if provided galleryLinks: '<a href="#" class="nyroModalPrev">Prev</a><a href="#" class="nyroModalNext">Next</a>', // Use .nyroModalPrev and .nyroModalNext to set the navigation link galleryCounts: galleryCounts, // Callback to show the gallery count galleryLoop: false, // Indicate if the gallery should loop zIndexStart: 100, cssOpt: { // Default CSS option for the nyroModal Div. Some will be overwritten or updated when using IE6 bg: { position: 'absolute', overflow: 'hidden', top: 0, left: 0, height: '100%', width: '100%' }, wrapper: { position: 'absolute', top: '50%', left: '50%' }, wrapper2: { }, content: { }, loading: { position: 'absolute', top: '50%', left: '50%', marginTop: '-50px', marginLeft: '-50px' } }, wrap: { // Wrapper div used to style the modal regarding the content type div: '<div class="wrapper"></div>', ajax: '<div class="wrapper"></div>', form: '<div class="wrapper"></div>', formData: '<div class="wrapper"></div>', image: '<div class="wrapperImg"></div>', swf: '<div class="wrapperSwf"></div>', iframe: '<div class="wrapperIframe"></div>', iframeForm: '<div class="wrapperIframe"></div>', manual: '<div class="wrapper"></div>' }, closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>', // Adding automaticly as the first child of #nyroModalWrapper title: null, // Modal title titleFromIframe: true, // When using iframe in the same domain, try to get the title from it openSelector: '.nyroModal', // selector for open a new modal. will be used to parse automaticly at page loading closeSelector: '.nyroModalClose', // selector to close the modal contentLoading: '<a href="#" class="nyroModalClose">Cancel</a>', // Loading div content errorClass: 'error', // CSS Error class added to the loading div in case of error contentError: 'The requested content cannot be loaded.<br />Please try again later.<br /><a href="#" class="nyroModalClose">Close</a>', // Content placed in the loading div in case of error handleError: null, // Callback in case of error showBackground: showBackground, // Show background animation function hideBackground: hideBackground, // Hide background animation function endFillContent: null, // Will be called after filling and wraping the content, before parsing closeSelector and openSelector and showing the content showContent: showContent, // Show content animation function endShowContent: null, // Will be called once the content is shown beforeHideContent: null, // Will be called just before the modal closing hideContent: hideContent, // Hide content animation function showTransition: showTransition, // Show the transition animation (a modal is already shown and a new one is requested) hideTransition: hideTransition, // Hide the transition animation to show the content showLoading: showLoading, // show loading animation function hideLoading: hideLoading, // hide loading animation function resize: resize, // Resize animation function endResize: null, // Will be called one the content is resized updateBgColor: updateBgColor, // Change background color animation function endRemove: null // Will be called once the modal is totally gone };
Callbacks
As an effort to be as more flexible as possible, the plugin provide many callbacks that you can use to alter the data at different time in the process. To be more clear, here is the full process with all possible callback:
- The User click on the link or you write some code to open the modal
- processHandler(settings);: Use this callback to change the type, the height requested, etc...
- If it's a new modal:
- showBackground(elts, settings, callback);: elts.bg should be visible after it
- showLoading(elts, settings, callback);: elts.loading should be visible after it
- handleError(elts, settings);: will be calling in case of error, just before showing the error message
- hideLoading(elts, settings, callback);: elts.loading should be hidden after it
- If there is an ajax or a form call, the eventual Javascript code inside it will be called at this time
- endFillContent(elts, settings);: modal.content is already wrapped. The links to open or close are not binded. This could be a could be good place to alter the content, the size, add some close link
- showContent(elts, settings, callback);: modal.contentWrapper should be visible after it
- showTransition(elts, settings, callback);: elts.loading should be visible after it and elts.contentWrapper should be hidden
- If there is an ajax or a form call, the eventual Javascript code inside it will be called at this time
- handleError(elts, settings);: will be calling in case of error, just before showing the error message
- endFillContent(elts, settings);: modal.content is already wrapped. The links to open or close are not binded. This could be a could be good place to alter the content, the size, add some close link
- hideTransition(elts, settings, callback);: elts.loading should be hidden after it and elts.contentWrapper should be shown
- endShowContent(elts, settings);: The modal is now fully visible. Here is a place to add more visual elements which could have some issues in some browser
- The User enjoy the modal. One day, he will probably close the modal or click somewhere to open a new modal
-
You have the ability to resize the modal by using $.nyroModalSettings with width and/or height parameters. In this case:
- resize(elts, settings, callback);: elts.contentWrapper should be at the new dimensions after it
- endResize(elts, settings);: will be called once the resize is done
- updateBgColor(elts, settings, callback);: elts.bg should be shown with the new color. To animate the color, be sure to include the color plugin.
- beforeHideContent(elts, settings, callback);: called just before the removing modal. use this to remove element that could create trouble with the hiding animation
- hideContent(elts, settings, callback);: modal.contentWrapper should be hidden after it
- If a new modal is requested, go back to the 2nd step. If not, we're closing the modal and continue
- hideBackground(elts, settings, callback);: modal.bg should be hidden after it
- Everything created by the plugin will be removed
- endRemove(elts, settings);: will be called once the modal is totally gone. Elements in the elts object will be unusable
The object elts will contain these parameters:
- started: indicate if the modal is started
- ready: indicate if the modal is ready
- dataReady: indicate if the data are ready
- anim: indicate if the modal is currently animated
- animContent: indicate if the modal content is currently animated
- loadingShown: indicate if the loading is currently shown
- transition: indicate if the transtion is currently shown
- closing: indicate if the modal is closing
- error: indicate if there is an error in the data loading
- blocker: the blocker element if existing
- blockerVars: blocker variables used to position the modal elements
- full: jQuery object for the full nyroModal div container
- bg: jQuery object for the background div
- loading: jQuery object for the loading div
- tmp: jQuery object for the temporary div
- content: jQuery object for the content div
- wrapper: jQuery object for the wrapper div (inserted between content and contentWrapper)
- contentWrapper: jQuery object for the content wrapper div
To read more about the animation callback, see below.
Animation Callbacks
You can redefine the animation as you want. To do so, you'll rewrite completly the animation function. That mean you can whatever you want. If you want simply show the element without any animation, you can simply do an show in the element and execute the callback. That's it.
To be more convenient, all animation callback function takes the exact same parameters:
- elts: will be used to access to the elements. To be sure to be totally free to do what you want as you want, you can access all element. You're free to break everything if you like to! See previous chapter to know what's inside
- settings: contains the whole currentsettings object. You have to use some elements inside this object to be sure to do something working good
- callback: don't forget to execute this one! If you don't, the modal will be broken. You can call it by passing it to the complete attribute for the animation, or simply do something like: callback();
The best way to start an animation function is probably to copy/paste his content from the plugin, see how it works and what is doing and then start edit it.
When positionning the loading or the content, you'll probably center it. To do so we usually use this king of CSS:
#element { position: fixed; width: 500px; height: 300px; margin-left: -250px; // -width / 2 margin-top: -150px; // -height / 2 }
And it should works. But you probably know that IE6 doesn't understand the position fixed. That's why you have to use settings.marginScrollTop and settings.marginScrollLeft to be sure your element is well centered. These values will be equal to zero in the convenient browser, and equal to the scroll values in IE6. When showing the content, 2 others values are available to set the margin: settings.marginLeft and settings.marginTop. For example, the CSS for the content wrapper is set like that:
function showContent(elts, settings, callback) { elts.contentWrapper .css({ // Reset the CSS at the start position marginTop: (-100/2 + settings.marginScrollTop)+'px', marginLeft: (-100/2 + settings.marginScrollLeft)+'px', height: '100px', width: '100px', opacity: 0 }) .show() .animate({ // Set the width width: settings.width+'px', marginLeft: (settings.marginLeft)+'px', opacity: 0.5 }, {duration: 350}) .animate({ // Set the height height: settings.height+'px', marginTop: (settings.marginTop)+'px', opacity: 1 }, {complete: callback, duration: 350}); }
Modal Dimensions
Because understand how the modal is resized could be a nightmare, here is the explanation about how works nyroModal.
Firstly, there is minWidth and minHeight which will apply everytime regardless the modal content type. By default, these values are set to 150 by 150.
Then the modal window will never goes outside the viewport. If a dimension will be outside, it's decreased to fit with the view port.
There is a padding parameter (20 by default) used to space the external boundary of the modal from the viewport.
Regarding the images, they will be resized proportionnaly if they are to big to respect the padding described below.
When you make an Ajax Request, you'll show HTML content. In nyroModal, the size requested will be the real content size available inside the #nyroModalContent div. That mean the content inside the padding of the #nyroModalContent div will be the requested dimensions. For example, requested a 500 by 500 pixels size will result for the #nyroModalContent of these values (screenshot made with Firebug):
Why do that?
Imagine working on a website using nyroModal. When requested your modal with different size, you'll take care of the content to fit exactly with the design. That works and everybody is happy.
But 3 months later the design has to be changed regarding the nyroModal looks and feel for adding some margin or border.
As the dimensions is the content inside the modal, changing the dimensions of the margin, padding or border of the wrapper or content won't change the shown dimensions. To make the change you only have to change your CSS and check for some modal if it's work as expected.
Download
nyroModal is licensed under the MIT License.
nyroModal is hosted by Google code.
You can download the latest version here.
In the archive you will find the whole javascript source, the packed and the minified source.
You'll also find 2 CSS version and the default images. The full CSS version is just here to show
you the whole HTML structure to customize exactly how you want, if you need.
Changelog
- Version 1.6.2 (02/23/2010)
- Fix IE6 bug (Issue 435)
- Version 1.6.1 (02/15/2010)
- Fix width in IE6 (Issue 403)
- Version 1.6.0 (02/15/2010)
- Version 1.5.5 (11/08/2009)
- Fix visual issue in IE6 (Issue 330)
- Version 1.5.4 (11/08/2009)
- Fix when using ASP ScriptManageur in IE6 (Issue 303)
- Set css.content.overflow to visible instead of hidden when showing an image or a swf (Issue 312)
- Update default PHP files to be HTML, load jQuery from Google, load image from webserver (Issue 316)
- Remove default setting css.content.overflow and place it in default CSS (Issue 345)
- Remove instantiate of settings in setDefaultCurrentSettings (Issue 341)
- Add windowResize setting to disable the autoresize feature (Issue 353)
- Fix visual issue when closing modal with iframe (Issue 359)
- Infinite loop for gallery when galleryLoop setting set to true (Issue 358)
- Fix issue when updating modal setting for background click closing (Issue 366)
- Version 1.5.3 (11/08/2009) (This version didn't live due to mistakes in source file with remaining debug codes)
- Version 1.5.2 (08/14/2009)
- Remove the word 'false' when using iframe (Issue 292)
- Fix titleFromIframe behaviour (Issue 296)
- Improve selection for galleries (Issue 300)
- Don't open modal if the event was prevented (Issue 304)
- Fix background height to cover the whole page in IE6 (Issue 305)
- Fix iframe detection in https environment (Issue 308)
- Version 1.5.1 (07/17/2009)
- Fix double loading with iframe (Issue 246)
- Improve rel attribute for galleries (Issue 241)
- Don't show counter in galleires when there is only one element (Issue 241)
- Fix missing keyword 'var' (Issue 278)
- Load same page for a form without action attribute (Issue 218)
- Fix when using base tag (Issue 248) Thanks to Pragmatec
- forceType works now in every situations (Issue 264)
- Disabling the Enter key reload feature (Issue 271)
- Fix IE8 bug when using iframe in some cases (Issue 281)
- Fix autoresizing iframe (Issue 282)
- addImageDivTitle now set to false by default (as there is the title to show it)
- Version 1.5.0 (05/14/2009)
- Fix title issue in gallery mode (Issue 212)
- Browser detection more precise (Issue 181 and Issue 192)
- Fix IE security alert in SSL with iframe (Issue 242)
- Don't make gallery if rel="nofollow" (Issue 241)
- Don't open external swf in iframe (Issue 235)
- Remove font-family in CSS (Issue 232)
- Improvement: autoresize modal when the window is resized (Issue 221)
- New setting zIndexStart to set the z-index for nyroModal elements (Issue 187)
- New callback setting galleryCounts(nb, total, elts, settings) to add the count in the title in gallery mode. Overwrite it if you don't want the count stuff
- New setting addImageDivTitle to indicate if the div title should be inserted for an image (as the modal title is now here, it will be defined to false by default in the next release) (Issue 204)
- The close button is now inside the wrapper div, which means you could customize it by CSS regarding the content type (Issue 189)
- Version 1.4.1 (02/12/2009)
- Fix bug when clicking on an image (Issue 160)
- Version 1.4.2 (02/19/2009)
- Version 1.4.1 (02/12/2009)
- Fix bug when clicking on an image (Issue 160)
- Version 1.4.0 (02/11/2009)
- Compatibility with jQuery 1.3
- Add gallery mode for any kind of contents; remove the wrapper.gallery settings and add gallery and galleryLinks settings
- Add ability to block only one element (Issue 99)
- Add ability to determine where should be executed a script; by default it's just after the endFillContent callback. You could now execute it just before the endShowContent callback by using the rev="shown" attribute on your scripts tag (Issue 102 and Issue 146)
- Automaticaly resize iframe when it's on the same domain (Issue 110)
- Fix form in iframe with target="_blank"; new type and wrapper created: iframeForm
- Fix deep copy in nyroModalSettings (Issue 40)
- Remove the noAnim script (use jQuery.fx.off instead)
- Version 1.3.1 (11/29/2008)
- Add Modal title (Issue 43)
- Fix bug with form and an action element (Issue 101)
- Fix ajax options bug (Issue 104 and Issue 121)
- Debug function fully overwrittable nyroModalDebug (Issue 104)
- Remote image (Issue 111)
- rtl settings changed to ltr (Issue 118)
- Check doctype and change HTML when needed (Issue 57)
- Version 1.3.0 (10/22/2008)
- Flash settings (Issue 37)
- Fix bug with title attribute with HTML (Issue 45)
- New modal.closing boolean and the contentWrapper isn't hidden after showTransition (Issue 69)
- New rtl setting to change the direction of the key in the gallery mode (Issue 53)
- New callback beforHideContent(elts, settings, callback); (Issue 59)
- extImg setting is replaced by regexImg to use a regexp to set the image mode (Issue 61)
- New modal.started boolean
- $.nyroModalSettings now allows you to edit default settings when the modal isn't started
- forceType setting to be used with nyroModalManual (automaticly removed for next calls)
- All type of modal now works with the url settings in nyroModalManual
- Fix visual bug with image transition
- Fix bug with local content loaded by Ajax (Issue 87)
- Fix loading, error and hiding animation position errors (Issue 91)
- Fix bug with width and height settings (Issue 94)
- Version 1.2.8 (06/24/2008)
- Fix bug with the mousewheel plugin (Issue 29)
- Add the autoSizable setting
- Fix bug with the iframe autosizing by setting autoSizable to false (Issue 31)
- Add a preventive CSS rule for images (Issue 28)
- Add a new alias for nyroModalManual with symply $.nyroModalManual()
- Add a new setting url for the nyroModalManual function to enable the Ajax content (Issue 33)
- Fix many visual issues with IE6
- Fix issue when there is a port in the URL (Issue 34) Thanks to edmond22 for his patch.
- Change the minimum size to 400 by 300 px
- Version 1.2.7 (06/12/2008)
- Version 1.2.6 (06/03/2008)
- Fix bug with hidden content
- Fix bug for settings type content in processHandler
- Version 1.2.5 (06/01/2008)
- Fix bug with ajax request when the current page is an index of the directory (url ends by /)
- Auto resize the modal if one or both dimensions wasn't set (Issue 21)
- Change default settings for width and height to use the new auto resize fetaure
- Add endRemove callback (Issue 14)
- Add $.nyroModalNext and $.nyroModalPrev for the gallery
- Version 1.2.4 (04/30/2008)
- Fix bug with javascript content (Issue 13)
- Do nothing when the modal is already loading or animating
- Don't fix form element in FireFox for image or gallery
- Version 1.2.3 (04/29/2008)
- Fix bug with inline content (Issue 11)
- Version 1.2.2 (04/27/2008)
- Fix Bug when using nyroModalManual (Issue 9)
- Add Form validation to demo
- Stop Event in demo for the manual calls
- Version 1.2.1 (04/26/2008)
- Fix Firefox Bug with the select (Issue 10)
- Fix visual Issue with showTransition
- Remove $.nyroModalResize() function. Use $.nyroModalSettings with width and/or height parameters instead.
- Add ability to update the background color by using $.nyroModalSettings with the bgColor parameter.
- Add updateBgColor animation function to update the background color. To animate the color, be sure to include the color plugin.
- Version 1.2.0 (04/19/2008)
- Add $.nyroModalResize() function, resize animation callback function and endResize callback
- Add wrapper object in the elts object given to the callbacks
- Stop mousewheel if the plugin mousewheel is available
- Fix bug in IE6 when body has position: relative;
- Version 1.1.1 (04/15/2008)
- Fix visual issue occuring only in Firefox on Mac (Thanks to Patrick)
- Fix rel attribute with [ or ] for the gallery
- Version 1.1 (04/12/2008)
- Add showTransition and hideTransition animation callbacks
- Update default CSS for the loading background image
- Version 1.0 (04/11/2008), first release
Support
If you wonder how you could do something with nyroModal, you should check the
wiki and you may find a solution. If not, you could ask in the
Google Code Page Issues.
If you find a bug or have a suggestion/request which could be useful for everybody, you can report them
in the Google Code Page Issues.
If you created some improvements or great animations functions, I will be glad to share them. Please
use also the Issue report to share them.