A Doubt in Slide program


#1

I did not face any problem in this exercise I just didn't understand why did the computer give a class to the paragraph tag(slide) and again gave a separate class to the div(pull-me) tag.

And why don't my code work when I put .slide in the object instead of .pull-me?

Just a little confused between slide class and the pull-me class....

<!DOCTYPE html>
<html>
    <head>
        <title>Slide Panel</title>
        <script type="text/javascript" src="script.js"></script>
        <link rel="stylesheet" type="text/css" href="stylesheet.css"></link>
    </head>
    <body>
        <div class="panel">
        <br />
        <br />
        <p>Now you see me!</p>
        </div>
        <p class="slide"><div class="pull-me">Slide Up/Down</div></p>
    </body>
</html>

$(document).ready(function(){
    $('.slide').click(function(){ 
        $('.panel').slideToggle('slow')
        });
    });


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.