toggle show

JS 2014. 5. 21. 16:16


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
    <head>
        <title>hello</title>
        <script src='./js/jquery-1.11.1.js'></script>
        <script src='./js/ch15.js'></script>
        <style>
    
        </style>
        <script>
            $(document).ready(function() {
                $('button').click(function(){
                    $('.page').toggle('slow');
                });
                
                                    
            }); //ready
            
            
    
        
        </script>
    </head>
    <body>
        <button>Toggle Show</button>
        <div class='page'>
            <h1>Lorem ipsum dolor sit amet</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
            
        </div>
    </body>
</html>
 


설정

트랙백

댓글