Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Fix opacity issue with caption container #383

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jquery.nivo.slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
$('.nivo-box').remove();
});

//Create caption
slider.append($('<div class="nivo-caption"></div>'));
// Create caption
slider.append($('<div class="nivo-caption"><div class="backdrop"></div><div class="nivo-caption-text"></div></div>'));

// Process caption function
var processCaption = function(settings){
var nivoCaption = $('.nivo-caption', slider);
var nivoCaption = $('.nivo-caption-text', slider);
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
var title = vars.currentImage.attr('title');
if(title.substr(0,1) == '#') title = $(title).html();
Expand Down Expand Up @@ -659,4 +659,4 @@

$.fn._reverse = [].reverse;

})(jQuery);
})(jQuery);
23 changes: 16 additions & 7 deletions nivo-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,29 @@
position:absolute;
left:0px;
bottom:0px;
background:#000;
color:#fff;
width:100%;
z-index:8;
padding: 5px 10px;
opacity: 0.8;
overflow: hidden;
display: none;
-moz-opacity: 0.8;
filter:alpha(opacity=8);
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
.nivo-caption .backdrop {
position: absolute;
background: #000;
bottom: 0;
height: 100%;
-moz-opacity: 0.8;
opacity: .8;
filter: alpha(opacity=8);
width: 100%;
}
.nivo-caption .nivo-caption-text {
display: none;
position: relative;
padding: 5px 10px;
}
.nivo-caption p {
padding:5px;
margin:0;
Expand Down Expand Up @@ -110,4 +119,4 @@
}
.nivo-controlNav a.active {
font-weight:bold;
}
}