Excluding Text from jQuery animated Div -
hi guys i'm building site using joomla , added jquery module changes opacity of containing div when hover on it. contains text, , text kinda looks cheesy because loses opacity well, wondering how target div exclude text text remains @ 100% opacity. heres code
<script src="http://code.jquery.com/jquery-1.4.4.js"></script> <script>jquery.noconflict(); jquery(document).ready(function() { //settings var opacity = 0.5, toopacity = 1, duration = 350; //set opacity asap , events jquery('.opacity').css('opacity',opacity).hover(function() { jquery(this).fadeto(duration,toopacity); }, function() { jquery(this).fadeto(duration,opacity); } ); }); </script>
i've tried use css change opacity of container while maintaining totally opaque children , came conclusion can't done, unfortunately.
what suggest have 2 divs positioned in same location animate opacity of 1 works background layer.
Comments
Post a Comment