我试图像皇家滑块上的箭头键一样隐藏FS按钮,但它不会工作,我不知道为什么......
royalslider.css line cca 50:
.rsArrow,
.rsNav,
.rsThumbsArrow,
.rsFullscreenBtn {
opacity: 1;
-webkit-transition:opacity 0.3s linear;
-moz-transition:opacity 0.3s linear;
-o-transition:opacity 0.3s linear;
transition:opacity 0.3s linear;
}
和certifikat.html js:
<script>
var slider = $('.royalSlider'),
btn = slider.find('.rsFullscreenBtn').addClass('rsHidden');
slider.hover(function() {
btn.removeClass('rsHidden');
}, function() {
btn.addClass('rsHidden');
});
</script>
文件:download
修改
我发现这个工作:
$(document).ready(function(){
$('.royalSlider').mouseover(function(){
$('.rsFullscreenBtn').removeClass('rsHidden');
}).mouseout(function(){
$('.rsFullscreenBtn').addClass('rsHidden');
});
});
但是如何在鼠标悬停之前为rsFullscreenBtn添加类rsHidden?在鼠标悬停之前,此按钮应该已隐藏... Thnaks