Struggling with the JQuery/Bootstrap version of Joomla's Modal Window -
i've been trying jquery version of modal window working within joomla framework.
this works mootools version pop iframe...
<?php jhtml::_('behavior.mootools'); ?> <a href="http://www.example.com/page2.html" class="modal" rel="{handler:'iframe'}"> click here launch popup</a>
however, nice not have use 2 javascript libraries, ideally want jquery equivalent working. have added...
jhtml::_('jquery.framework'); jhtml::_('jquery.ui');
i impression needs bootstrap framework too, i'm not overly familiar with.
what i'm after jquery equivalent of mootools example, or explination of best-practise way of doing when using jquery framework in joomla template.
(nb want use core joomla approach - know how add own modal script outside of that)
thanks
if looking bootstrap modal window in joomla 3.you can try below code-
$name = "mymodal"; $html = '<a href="#modal-' . $name.'" data-toggle="modal" class="btn">launch modal</a>'; $params = array(); $params['title'] = "test"; $params['url'] = "http://localhost/"; $params['height'] = 400; $params['width'] = "100%"; echo $html .= jhtml::_('bootstrap.rendermodal', 'modal-' . $name, $params);
Comments
Post a Comment