WT Fancybox.js

WT Fancybox.js

Downloads 5 Hits 21 CTR 24% 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.

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
458 Versions released
473576 Downloads
Cart
Cart is empty