dimanche 8 octobre 2017

jQuery help on method slideDown/slideUp can't get it to work

<!DOCTYPE html>
<html>
<head>
    <title>YES</title>
    <script src="http://ift.tt/NpIKOC"> </script>
</head>

<body>



    <img id="dramatic" src="statefair.jpg" width="400px" height="400px">
    <br>
    <button id="make_visible">HIDE</button>


    <style>
        img#dramatic {
        display: none;
        }
    </style>


    <script>

    $("button#make_visible").on("click", function() {
  $("img#dramatic").slideDown();
    });

    </script>

I am working with a book and in the book I am learning jquery's slideDown/Up method. I ran the code originally on my main web page and it will not work. So I just created a simple YES.html(seen above) to make sure I was coding it correctly. However it will not slide up or down image. I don't know what I am missing for this to work. I am a beginner so I could be missing something simple. Please explain your answer/solution in steps if possible or maybe guide me to a web page tutorial of some sort. Thanks.




Aucun commentaire:

Enregistrer un commentaire