jQuery Slide CSS Element Out Reducing Opacity -


hi trying slide css element out, gradually removing opacity until disappeared.

e.g want slide text right reduced opacity whilst sliding till disappeared.

//jquery $(document).ready(function() {     $('.heading1').animate({marginright:"20px",opacity:0},500) }) //html <div class="slidercontainer">  <a class="heading1">text</a>  </div>  //css .heading1 {     position:relative;   } 

i have tried doesn't slide out, move across screen. fades out. idea?

i want able animate in , out of screen reducing opacity when does.

use integers (20) instead of strings (20px):

$(document).ready(function() {       $('.heading1').animate({'margin-right':20,opacity:0},500); }) 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -