changer la transparence alpha RGBA avec jquery [double]
Question
Possible en double: jQuery + RGBA animations couleur
hey,
je veux changer l'opacité d'une valeur rgba sur le vol stationnaire, mais les séjours d'opacité à .07 .. peut-être ous pouvez me aider à trouver l'erreur.
CSS (hacks IE sont dans le fichier séparé - pas besoin de les mentionner ici)
.boxcaption{
float: left;
position: absolute;
height: 100px;
width: 100%;
background: rgb(255, 144, 11);
background: rgba(255, 144, 11, 0.7);
}
JS
var thumbslide = $('.boxgrid.captionfull').click(function() {
$('.boxgrid.captionfull.clicked').removeClass('clicked').children('.cover').stop().animate({top: 230, background: 'rgba(255, 144, 11, 0.7)'}, 350);
$(this).toggleClass('clicked').children('.cover').stop().animate({top: 0, height:"230px", background: 'rgba(255, 144, 11, 1)'}, 350);
});
La solution
le plugin couleur jquery ne prend pas en charge RGBA. utilisez plutôt: texte du lien
Autres conseils
Je sens ( non testé guess) que jQuery ne vérifie pas la propriété CSS background pour rbga(...)
et donc ne pas appliquer une solution hack pour changer le filter:alpha()
.
Je pense que vous aurez besoin de changer opacity:1
séparément.
.animate({top:0,height:"230px",background:'rgb(255, 144, 11)',opacity:1}, 350);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow