我正在使用Joomla模态窗口squeezebox。我希望能够在图像弹出窗口下方添加一些文本,例如www.pathgate.org图片。
在调用文章中的模态窗口时,有什么办法可以添加吗?
E.g。点击此处查看
我在想可能会有类似的东西:描述:' lorem ipsum doler坐在那里'
答案 0 :(得分:0)
类似这样的事情
<a class="modal" href="images/powered_by.png" title="text" rel="{handler:'img_ext'}">test</a>
window.addEvent('load', function() {
SqueezeBox.handlers.img_ext = function(elm) {
var url = elm.href;
this.image = new Image();
var events = {
loaded: function() {
var win = {x: window.getWidth() - this.options.marginImage.x, y: window.getHeight() - this.options.marginImage.y};
var size = {x: this.image.width, y: this.image.height};
for (var i = 0; i < 2; i++)
if (size.x > win.x) {
size.y *= win.x / size.x;
size.x = win.x;
} else if (size.y > win.y) {
size.x *= win.y / size.y;
size.y = win.y;
}
size = {x: parseInt(size.x), y: parseInt(size.y)};
if (window.webkit419) this.image = new Element('img', {'src': this.image.src});
else $(this.image);
this.image.setProperties({
'width': size.x,
'height': size.y});
size.y += 50;
var title = new Element('div',{text:elm.title});
var wrapper = new Element('div');
wrapper.adopt([this.image,title]);
this.applyContent(wrapper, size);
}.bind(this),
failed: this.onError.bind(this)
};
(function() {
this.src = url;
}).delay(10, this.image);
this.image.onload = events.loaded;
this.image.onerror = this.image.onabort = events.failed;
};
SqueezeBox.parsers.img_ext=function(preset) {
return (preset || this.url.test(/\.(jpg|jpeg|png|gif|bmp)$/i)) ? $(this.element) : false;
};
});