I'm developing component for Joomla! 1.5. I wish to make image pop-up in window when I click on it, like images pop-ups in media component. I peeked into ..\Joomla\administrator\components\com_media\views\medialist\view.html.php file and i saw that this part of the code is essential
Code:
window.addEvent('domready', function() {
$$('a.img-preview').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
window.top.document.preview.fromElement(el);
});
});
});");
I inserted that code into my program but it didn't worked because preview element doesnt exist in html document.
Also i tried something like:
...
JHTML::_( 'behavior.modal' );
...
...
....
this also didnt work, just opened new page with only my component rendering.
What should I do?