Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Update docs to include recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyapps committed Mar 14, 2017
1 parent 8acf7b7 commit e46bf80
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">

<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700|Open+Sans:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700|Open+Sans:400,700" rel="stylesheet" />

<script src="//code.jquery.com/jquery-3.1.1.min.js"></script>

Expand Down Expand Up @@ -263,7 +263,9 @@ <h1><a href="http://fancyapps.com/fancybox/3/">fancyBox3</a> Documentation</h1>

<ul>
<li><a href="http://fancyapps.com/fancybox/3/">Homepage</a></li>
<li><a href="https://github.com/fancyapps/fancyBox">Github</a></li>
<li><a href="http://fancyapps.com/fancybox/3/docs/">Documentation</a></li>
<li><a href="http://fancyapps.com/store/">Store</a></li>
<li><a href="https://github.com/fancyapps/fancybox">Github</a></li>
</ul>
</div>
</header>
Expand Down Expand Up @@ -806,7 +808,8 @@ <h2 id="options">Options</h2>
// Error message template
errorTpl : '&lt;div class=&quot;fancybox-error&quot;&gt;&lt;p&gt;The requested content cannot be loaded. &lt;br /&gt; Please try again later.&lt;p&gt;&lt;/div&gt;',

closeTpl : '&lt;button data-fancybox-close class=&quot;fancybox-close-small&quot;&gt;×&lt;/button&gt;',
// This will be appended to html content, if &quot;smallBtn&quot; option is not set to false
closeTpl : '&lt;button data-fancybox-close class=&quot;fancybox-close-small&quot;&gt;&lt;/button&gt;',

// Container is injected into this element
parentEl : 'body',
Expand All @@ -823,7 +826,7 @@ <h2 id="options">Options</h2>
// Close when clicked outside of the content
closeClickOutside : true,

// Callbacks
// Callbacks; See Documentation/API/Events for description and samples
beforeLoad : $.noop,
afterLoad : $.noop,
beforeMove : $.noop,
Expand All @@ -835,7 +838,6 @@ <h2 id="options">Options</h2>
afterClose : $.noop,
onActivate : $.noop,
onDeactivate : $.noop

}
</pre>

Expand Down Expand Up @@ -1049,7 +1051,6 @@ <h3 id="events">Events</h3>

<p>
fancyBox fires several events.

</p>

<pre><code>beforeLoad : Before the content of a slide is being loaded
Expand Down Expand Up @@ -1094,8 +1095,13 @@ <h3 id="events">Events</h3>
&lt;/script&gt;</code></pre>

<p>
It is also possible to attach an event handler for all instances.
Each callback receives two parameters - current fancyBox instance and current gallery object, if exists.
</p>

<p>
It is also possible to attach event handler for all instances.
To prevent interfering with other scripts, these events have been namespaced to <code>.fb</code>.
These handlers receive 3 parameters - event, current fancyBox instance and current gallery object.
</p>
<p>
Here is an example of binding to the <code>onComplete</code> event:
Expand All @@ -1106,6 +1112,17 @@ <h3 id="events">Events</h3>
});</code></pre>


<p>
If you wish to prevent closing of the modal, for example, if form is not validating, you can use <code>beforeClose</code>
callback. Simply return <code>false</code>:
</p>

<pre><code>beforeClose : function( instance, current, e ) {
if ( $('#my-field').val() == '' ) {
return false;
}
}
</code></pre>

<h2 id="modules">Modules</h2>

Expand All @@ -1129,7 +1146,11 @@ <h2 id="modules">Modules</h2>
thumbs : {
showOnStart : false, // Display thumbnails on opening
hideOnClosing : true // Hide thumbnail grid when closing animation starts
}</code></pre>
},
fullScreen : {
requestOnStart : false // Request fullscreen mode on opening
},
hash : false // Hash value</code></pre>

<p>
Example (show thumbnails on start):
Expand Down Expand Up @@ -1172,16 +1193,23 @@ <h2 id="modules">Modules</h2>
Thumbs.show();
Thumbs.toggle();

FullScreen.isAvailable();
FullScreen.isActivated();
FullScreen.launch();
FullScreen.request( elem );
FullScreen.exit();
FullScreen.toggle();
FullScreen.toggle( elem );
FullScreen.isFullscreen();
FullScreen.enabled();

SlideShow.start();
SlideShow.stop();
SlideShow.toggle();
</code></pre>

<p>
If you wish to disable hash module, use this snippet (after including JS file):
</p>

<pre><code>$.fancybox.defaults.hash = false;</code></pre>

<!--
FAQ
Expand Down Expand Up @@ -1298,7 +1326,6 @@ <h3>How to reposition thumbnail grid</h3>
</p>
</div>
</footer>

<script>

/* Sticky nvigation */
Expand Down

0 comments on commit e46bf80

Please sign in to comment.