stan / reveal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fork specific features

Note - stuck with jQuery 1.6.4 and maintained support for the 'old' event bindings. Demo.html contains demos of all the below features.

  • Can load an image directly into an on-the-fly modal (currently basic, no resizing) [data-reveal-image]
  • Can load content via ajax in to an on-the-fly modal [revealUrl/data-reveal-url, revealUrlId/data-reveal-url-id, revealLoading/data-reveal-loading]
    • 'data-reveal-url' loads the data at the url (data-reveal-id)
    • 'data-reveal-url-id' loads the data from an element with the specified id at the url (requires data-reveal-url to be defined)
    • 'data-reveal-loading' is a message displayed to the user while their content is downloading (default - "We're just downloading the content, hang on in there!")
  • Can close a modal using a function [$('#myModal').reveal('close');]
  • Can specify a callback function that gets executed AFTER the OPEN animation (default NONE) [openedCallback/data-opened-callback]
  • Can specify a callback function that gets executed AFTER the CLOSE animation (default NONE) [closedCallback/data-closed-callback]
  • Can specify a timeout value to close the modal after x milliseconds (default NONE) [closeOnTimeout/data-close-on-timeout]
  • Can specify a custom key to close the modal (default 27 (ESCAPE)) - or set it to FALSE to disable [closeOnKey/data-close-on-key]
  • Optimized animation code - reduced by 10-20 lines
  • Cleaned javascript and restructured to make it clearer
  • Cleaned css and added 'x' close button hover effect

I won't be updating jQuery to 1.7 using on/off. Using live provides backward compatibility down to jQuery 1.4, and 1.7 feels like an in-the-middle version, containing past and future features. Perhaps when 1.8 or later is released I will branch.

Reveal: A jQuery Plugin For Modals

Reveal is a jQuery plugin for dead simple modals that comes with some sexy base CSS and can be implemented programatically or with the new HTML5 custom data attributes (data-attribute).


Download & Documentation

All of the docs and the download link are on a playground page here: http://www.zurb.com/playground/reveal-modal-plugin

Issues

Have an issue - please post it here: https://github.com/zurb/reveal/issues

Comments?

Visit the blog post for Reveal and make your comment :) http://www.zurb.com/article/557/reveal-jquery-modal-plugin-

About