So if I dynamically create all the children in the UL (note that the UL element is NOT dynamically created):
<ul id="gallerizeRoot" class="gallerizeCss">
<li><img src="cat.png" caption="A small cat" alt="Image" /></a></li>
<li><img src="lamb.jpg" caption="Boo boo bee boo" alt="Image" /></a></li>
<li><img src="h1.jpg" caption="H1z1" alt="Image" /></li>
<li><img src="cashmoney.jpg" caption="Money" alt="Image" /></li>
<li><img src="cards.jpg" caption="Aces high" alt="Image" /></li>
<li><img src="walkingbread.jpg" caption="The Walking Bread" alt="Image" /></li>
</ul>
How can I access the images to apply effects like hide, fade in, fade out, ect?
I'm trying to call this function on all of the images in the list
$this.wrap('<div class="' + settings.Class + '"></div>').parent().css({
'height': imageHeight,
'width': imageWidth
});
$this.after('<span>' + caption + '</span>');
$this.css({
'display': 'block'
}).next().css({
'position': 'absolute',
'margin-top': '-' + captionHeight + 'px',
'width': imageWidth + 'px',
'height': captionHeight + 'px',
'background': 'rgba(' + settings.captRed + ',' +
settings.captGreen + ',' +
settings.captBlue + ',' +
settings.opacity + ')',
'text-align': settings.textAlign,
'font-size': settings.textSize
}).attr('class', 'captionizer').hide();
if (settings.hover) {
$this.parent().hover(
function () {
$this.next().fadeTo(100, settings.opacity);
},
function () {
$this.next().fadeTo(100, 0);
});
}
else {
$this.next().fadeTo(1, settings.opacity);
};
with this (where $this is the UL element):
$this.children('img').Captionize();

New Topic/Question
Reply


MultiQuote



|