Thursday, December 5, 2013

Use JQuery Squeeze box for modal display

To use modal pop up in joomla, there is an in-built javascript plugin Squeeze box based on the mootools library.

JHtml::_('behavior.modal');

This will add the squeeze box modal library.

And then add a class "modal" to the anchor.

Example
<a href="http://www.example.com/somepage.html" 
class="modal" rel="{size: {x: 700, y: 500}, handler:'iframe'}" 
id="modalLink1">
Click here to see this interesting page</a>

The above will load a iframe in modal box.

Reference
http://www.spiralscripts.co.uk/Joomla-Tips/using-modal-windows-with-joomla.html

No comments:

Post a Comment