antpower26 Posted August 22, 2011 Report Posted August 22, 2011 Hi I am just coding in jquery for the first time :script type="text/javascript"> $(document).ready(function(){ $("#appearingduo").fadeIn('slow', function () { // fade has finished }); }); </script> </head> The syntax is a little confusing, for that reason. on my current build I am trying to fade in an image, it is working, but I would like the fade in to slow down to say around 2 seconds, I am having trouble making this happen, please help:)))) Ant
falkencreative Posted August 22, 2011 Report Posted August 22, 2011 The jquery documentation is pretty helpful for this sort of thing: http://api.jquery.com/fadeIn/ To adjust the speed, change 'slow' to a number of milliseconds: <script type="text/javascript"> $(document).ready(function(){ $("#appearingduo").fadeIn(2000, function () { // fade has finished }); }); </script> Also, keep in mind that if you don't need any sort of javascript action after the fade has finished, you can drop the "function()" section like this: <script type="text/javascript"> $(document).ready(function(){ $("#appearingduo").fadeIn(2000); }); </script>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now