Skip to content

Commit

Permalink
Try to fix documentation lists
Browse files Browse the repository at this point in the history
  • Loading branch information
nyroDev committed Dec 11, 2010
1 parent 2ff8207 commit 04e307d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,22 @@ Filters are used to provide many basics functionnality like Ajax download, but i
A filter is a set function that will be called by nyroModal core at many differents points. These functions call be used to do everything needed to make the modal work as you excpet or to add others behaviors needed for your projet: add some elements inside the modal, updating your page content, add some Ajax call, etc...

Here is how filters works:

1. When $('element').nyroModal(); is called, the nyroModal object is created and attached to the DOM element instancied
2. Every available filters are tested again the nyroModal object using the is function
* If this function returns true, the filters will be used all the time for this element.
* If it returns false, the filters will not be used anymore for this element
* If this function returns true, the filters will be used all the time for this element.
* If it returns false, the filters will not be used anymore for this element
3. nyroModal core calls every init function of every filters selected for the element
* These init function should bind the event they need, create their own object if needed
* If the filters need to be the one used to load the content, the loadFilter setting of the nyroModal ovject should be defined to its name.
* These init function should bind the event they need, create their own object if needed
* If the filters need to be the one used to load the content, the loadFilter setting of the nyroModal ovject should be defined to its name.
4. Througout the living of nyroModal, every function or callback defined in all selected filters will be called (see the list below)


All function or callbacks receive the same nyroModal object as a unique parameter.


The list of all function or callback that can be called in a filter:

* is: should return true or false to select the filter for the current or element or not. This function is REQUIRED !
* init: called at the very beggining of the process. This function should bind element or create object needed later
* initElts: called at the beggining of the open process, juste before the load start. After that, all the needed div are created and attached to the DOM
Expand All @@ -177,7 +181,9 @@ The list of all function or callback that can be called in a filter:
* afterClose: called at the end of the closing process, regarding the animation
* keyHandle: called when a key is hit if the keyHandle is enable and if the modal is on the top


Like the version 1, there is a bunch of others callback that you can define before and after every animation. The version 2 put it in a new way by letting you the ability to define a function before and after every animation function.

* beforeShowBg: called just before the showBg animation
* afterShowBg: called just after the showBg animation
* beforeHideBg: called just before the hideBg animation
Expand All @@ -197,7 +203,6 @@ Like the version 1, there is a bunch of others callback that you can define befo
* beforeResize: called just before the resize animation
* afterresize: called just after the resize animation

To define a new filter, you need to provide at least one

There is some some basic filters that you can use on your project that enable the basic usage of this kind of plugin.
Here is a list of the filters officially provided:
Expand Down

0 comments on commit 04e307d

Please sign in to comment.