htmlcssnivo-slider

How to show caption in Nivo Slider only after hover event?


I need to show caption of image in Nivo Slider after hover event.

I try to hide caption using css:

.nivo-caption {
    text-align: center;
    dislay:none;
}

And display this like as:

$('#slider').hover(function(){ $(".nivo-caption").show();});

But it does not work


Solution

  • Try This

    $('#slider').mouseover(function(){ $("#slider").addClass("nivo-caption");});