0
<!DOCTYPE html> <html> <head> <title> </title> <style> </style> <script type="text/javascript"> $(document).ready(function { $('img').slideDown('slow'); }); </script> </head> <body> <img src="images\sjmak-music-logo.jpeg"/> </body> </html> 

The simple code example above is not working; I am attempting to simply make the image slide down from the top of the screen but it stays static. I also attempted to use 'display: none' on the image, but the image remains hidden instead of sliding down from the top.

2
  • 1
    where is jQuery library added Commented Oct 21, 2013 at 15:46
  • Doesn't the img src have to use / not `\`? Commented Oct 21, 2013 at 15:48

1 Answer 1

6

You need to include jQuery library file to use jQuery methods.

In the below sample a jquery cdn version is added. Also to slide down an image it has to be hidden first

<!DOCTYPE html> <html> <head> <title> </title> <style> </style> <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('img').slideDown('slow'); }); </script> </head> <body> <img src="images\sjmak-music-logo.jpeg" style="display: none"/> </body> </html> 

Demo: Fiddle

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.