WT Fancybox.js

WT Fancybox.js

Downloads 111 Hits 268 CTR 41% Plg Free

The plugin registers the Fancybox package in Joomla Web Assets Manager. After registration, you can use it in your extensions.

WT Fancybox.js

Description

This is a plugin for Joomla developers. It allows you to use  Fancybox.js anywhere in Joomla 4+: modules, components, plugins.

Fancybox.js is distributed by the author under a commercial license. To use it on your websites, you must read the license agreement and purchase a license according to one of the Fancyapps tariff plans in order to use it on your websites without possible legal consequences. This plugin is just a wrapper over a js script that provides the correct way to connect to Joomla. Using this plugin to connect Fancybox.js is equivalent to independently connecting a script in a template or an extension layout in Joomla.

To do this, use in your code:

<?php
use Joomla\CMS\Factory;

$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->usePreset('wtfancybox'); // Local file 
$wa->usePreset('wtfancybox-remote'); // Use from CDN

The plugin can be used as a dependency when developing your extensions for Joomla 4+. The plugin uses the Joomla 4+ update system.

Facnybox.js quick start

An example from the official documentation. HTML markup:

<a href="/image-a.jpeg" data-fancybox data-caption="Single image">
  <img src="/thumbnail-a.jpeg" />
</a>

Javascript. It would be better to wrap a js in DOMContentLoaded.

document.addEventListener('DOMContentLoaded', () => {
	Fancybox.bind("[data-fancybox]", {
        // Your custom options
        });
});

Joomla

Extension type:
Plugin
Folder:
System
Joomla version:
5.3.1

What's new

Addition

v.6.0.9

First extension version.

Related extensions

WebTolk Joomla Extensions

94 Extensions
11 Categories
459 Versions released
481962 Downloads
Cart
Cart is empty