Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery animation - making an image visible from left to right

I am trying to make an image hidden hidden using jQuery. I am using .hide() function. I am applying it to div containing the image which has to be hidden. Its not working for some reason. I have created a fiddle.

Is it possible to use animate so that the image becomes visible from right to left in say 1 sec. In other words, animate the width from 0 to maximum value but the image should become visible from left to right.

like image 290
Bobby Francis Joseph Avatar asked Dec 29 '25 01:12

Bobby Francis Joseph


1 Answers

You were not using the correct syntax.missing ); at the end of each function

$(document).ready(function() {
  $('#animate').click(function() {
      $('#myimage').animate({width: 'hide'},1000);
   });  
});
like image 147
Kunal Vashist Avatar answered Dec 31 '25 14:12

Kunal Vashist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!