|
Server : Apache System : Linux vps.urbanovitalino.adv.br 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 User : urbanovitalinoad ( 1001) PHP Version : 7.3.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/urbanovitalinoad/public_html/extranet/media/system/js/ |
Upload File : |
/**
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* JCaption javascript behavior
*
* Used for displaying image captions
*
* @package Joomla
* @since 1.5
* @version 1.0
*/
var JCaption = function(_selector) {
var $, selector,
initialize = function(_selector) {
$ = jQuery.noConflict();
selector = _selector;
$(selector).each(function(index, el) {
createCaption(el);
})
},
createCaption = function(element) {
var $el = $(element),
caption = $el.attr('title'),
width = $el.attr("width") || element.width,
align = $el.attr("align") || $el.css("float") || element.style.styleFloat || "none",
$p = $('<p/>', {
"text" : caption,
"class" : selector.replace('.', '_')
}),
$container = $('<div/>', {
"class" : selector.replace('.', '_') + " " + align,
"css" : {
"float" : align,
"width" : width
}
});
$el.before($container);
$container.append($el);
if (caption !== "") {
$container.append($p);
}
}
initialize(_selector);
}