HTML-Code:
<script>
(function($) {
<?php if ($this->triggerMode == 'onWindowLoad'): ?>
$(window).load(function() {
<?php else: ?>
$(document).ready(function() {
<?php endif; ?>
$("#caroufredsel_<?php echo $this->id; ?>").carouFredSel({
<?php
$oComma = $iComma = false; // o(uter)/i(nner) comma after option needed?
// global options
if ($this->carouselType) {
echo ($oComma == true ? ', ' : '') . $this->carouselType;
$oComma = true;
}
if ($this->responsive) {
echo ($oComma == true ? ', ' : '') . $this->responsive;
$oComma = true;
}
if ($this->direction) {
echo ($oComma == true ? ', ' : '') . $this->direction;
$oComma = true;
}
if ($this->width) {
echo ($oComma == true ? ', ' : '') . $this->width;
$oComma = true;
}
if ($this->height) {
echo ($oComma == true ? ', ' : '') . $this->height;
$oComma = true;
}
if ($this->align) {
echo ($oComma == true ? ', ' : '') . $this->align;
$oComma = true;
}
if ($this->padding) {
echo ($oComma == true ? ', ' : '') . $this->padding;
$oComma = true;
}
if ($this->cookie) {
echo ($oComma == true ? ', ' : '') . $this->cookie;
$oComma = true;
}
// echo ($oComma == true ? ', ' : '') . 'onCreate: function(data) { }';
// subobject 'items' options
if ($this->itemsVisible || $this->itemsStart || $this->itemsWidth || $this->itemsHeight) {
echo ($oComma == true ? ', ' : '') . 'items: { ';
if ($this->itemsVisible) {
echo ($iComma == true ? ', ' : '') . $this->itemsVisible;
$iComma = true;
}
if ($this->itemsStart) {
echo ($iComma == true ? ', ' : '') . $this->itemsStart;
$iComma = true;
}
if ($this->itemsWidth) {
echo ($iComma == true ? ', ' : '') . $this->itemsWidth;
$iComma = true;
}
if ($this->itemsHeight) {
echo ($iComma == true ? ', ' : '') . $this->itemsHeight;
$iComma = true;
}
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'scroll' options
if ($this->scrollItems || $this->scrollFx || $this->scrollEasing || $this->scrollDuration || $this->scrollPauseOnHover) {
echo ($oComma == true ? ', ' : '') . 'scroll: { ';
if ($this->scrollItems) {
echo ($iComma == true ? ', ' : '') . $this->scrollItems;
$iComma = true;
}
if ($this->scrollFx) {
echo ($iComma == true ? ', ' : '') . $this->scrollFx;
$iComma = true;
}
if ($this->scrollEasing) {
echo ($iComma == true ? ', ' : '') . $this->scrollEasing;
$iComma = true;
}
if ($this->scrollDuration) {
echo ($iComma == true ? ', ' : '') . $this->scrollDuration;
$iComma = true;
}
if ($this->scrollPauseOnHover) {
echo ($iComma == true ? ', ' : '') . $this->scrollPauseOnHover;
$iComma = true;
}
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
if (!$this->autoPlay && $this->autoProgress == 'pie') {
echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { $().hideProgressBar("caroufredsel_bar_wrapper_' . $this->id . '"); }';
}
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
if (!$this->autoPlay && $this->autoProgress == 'pie') {
echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { $().initProgressBar("caroufredsel_bar_' . $this->id . '", { barBackgroundColor: progressBarBackgroundColor_' . $this->id . ' }); }';
}
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'auto' options
if (!$this->autoPlay) {
if ($this->autoButton || $this->autoTimeoutDuration || $this->autoDelay || $this->autoProgress) {
echo ($oComma == true ? ', ' : '') . 'auto: { ';
if ($this->autoButton) {
echo ($iComma == true ? ', ' : '') . 'button: "#caroufredsel_button_' . $this->id . '"';
$iComma = true;
}
if ($this->autoTimeoutDuration) {
echo ($iComma == true ? ', ' : '') . $this->autoTimeoutDuration;
$iComma = true;
}
if ($this->autoDelay) {
echo ($iComma == true ? ', ' : '') . $this->autoDelay;
$iComma = true;
}
if ($this->autoProgress) {
echo ($iComma == true ? ', ' : '') . 'progress: { ';
echo 'bar: "#caroufredsel_bar_' . $this->id . '"';
if ($this->autoProgress == 'pie') {
echo ', updater: function(percentage) { $().updateProgressBar("caroufredsel_bar_' . $this->id . '", { barColor: progressBarColor_' . $this->id . ' }, percentage); }';
}
if ($this->autoProgressInterval) {
echo ', ' . $this->autoProgressInterval;
}
echo ' }';
$iComma = true;
}
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onTimeoutStart: function(percentage, duration) { }';
if ($this->autoProgress == 'pie') {
echo ($iComma == true ? ', ' : '') . 'onTimeoutStart: function(percentage, duration) { $().initProgressBar("caroufredsel_bar_' . $this->id . '", { barBackgroundColor: progressBarBackgroundColor_' . $this->id . ' }); $().showProgressBar("caroufredsel_bar_wrapper_' . $this->id . '"); }';
}
// echo ($iComma == true ? ', ' : '') . 'onTimeoutEnd: function(percentage, duration) { }';
// echo ($iComma == true ? ', ' : '') . 'onTimeoutPause: function(percentage, duration) { }';
if ($this->autoProgress == 'pie') {
echo ($iComma == true ? ', ' : '') . 'onTimeoutPause: function(percentage, duration) { $().hideProgressBar("caroufredsel_bar_wrapper_' . $this->id . '"); }';
}
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
} else {
echo ($oComma == true ? ', ' : '') . $this->autoPlay;
$oComma = true;
}
// subobject 'prev' options
if ($this->navigation || $this->prevKey) {
echo ($oComma == true ? ', ' : '') . 'prev: { ';
if ($this->navigation) {
echo 'button: "#caroufredsel_prev_' . $this->id . '"';
$iComma = true;
}
if ($this->prevKey) {
echo ($iComma == true ? ', ' : '') . $this->prevKey;
$iComma = true;
}
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'next' options
if ($this->navigation || $this->nextKey) {
echo ($oComma == true ? ', ' : '') . 'next: { ';
if ($this->navigation) {
echo 'button: "#caroufredsel_next_' . $this->id . '"';
$iComma = true;
}
if ($this->nextKey) {
echo ($iComma == true ? ', ' : '') . $this->nextKey;
$iComma = true;
}
echo ' }';
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'pagination' options
if ($this->pagination) {
echo ($oComma == true ? ', ' : '') . 'pagination: { ';
echo 'container: "#caroufredsel_pagi_' . $this->id . '"';
$iComma = true;
if ($this->paginationKeys) {
echo ($iComma == true ? ', ' : '') . $this->paginationKeys;
$iComma = true;
}
// echo ($iComma == true ? ', ' : '') . 'anchorBuilder: function(nr) { }';
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'swipe' options
if ($this->swipeOnTouch || $this->swipeOnMouse) {
echo ($oComma == true ? ', ' : '') . 'swipe: { ';
if ($this->swipeOnTouch) {
echo ($iComma == true ? ', ' : '') . $this->swipeOnTouch;
$iComma = true;
}
if ($this->swipeOnMouse) {
echo ($iComma == true ? ', ' : '') . $this->swipeOnMouse;
$iComma = true;
}
// echo ($iComma == true ? ', ' : '') . 'conditions: function(direction) { }';
// echo ($iComma == true ? ', ' : '') . 'onBefore: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onAfter: function(data) { }';
// echo ($iComma == true ? ', ' : '') . 'onEnd: function(direction) { }';
echo ' }';
$iComma = false; // reset inside subobject comma flag
$oComma = true;
}
// subobject 'mousewheel' options
if ($this->mousewheel) {
echo ($oComma == true ? ', ' : '') . $this->mousewheel;
$oComma = true;
}
echo ' }, { ';
$oComma = $iComma = false; // o(uter)/i(nner) comma after option needed?
if ($this->debug) {
echo ($oComma == true ? ', ' : '') . $this->debug;
$oComma = true;
}
echo ($oComma == true ? ', ' : '') . 'wrapper: { classname: "caroufedsel_wrapper caroufredsel_wrapper_' . $this->id . '" }';
$oComma = true;
echo ' }';
?>
);
// START Ergaenzung Nina
// }); vom Original an der Stelle gegen }).find ... ausgetauscht
}).find(".ce_image").hover(
function() { $(this).find("figcaption").slideDown(); },
function() { $(this).find("figcaption").slideUp(); }
);
// ENDE Ergaenzung Nina
})(jQuery);
</script>
Im Slider habe ich bei den Inhaltselementen jeweils das Feld für die Bildbeschreibung (figcaption) gefüllt.
Lesezeichen