How to fadeIn the globalCaption when item becomes active?
Am using Contentflow to display an image gallery. Among the configuration options there is also this code:
/*
* called when an item becomes active.
*/
onMakeActive: function (item) {},
On the HTML markup, there is this div:
<div class='globalCaption'></div>
I want the .globalCaption to fadeIn wh开发者_Go百科en item becomes active so I added this:
/*
* called when an item becomes active.
*/
onMakeActive: function (item) {
$(".globalCaption p").fadeIn('fast');
},
...and it doesn't work
First, change your selector from $(".globalCaption p")
to $(".globalCaption")
Secondly, make sure .globalCaption
is styled display:none;
by default. It can not fade in if it is already visible.
You say you have the following div:
<div class='globalCaption'></div>
But your jQuery code is telling the browser to fade in a p
element inside that div, and the p
doesn't seem to exist. Try removing the p
from the selector, like so:
$(".globalCaption").fadeIn('fast');
There is a known bug with IE and this event http://code.google.com/p/contentflow/issues/detail?id=17
精彩评论