Results 1 to 6 of 6

Thread: Jquery append()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Sep:2009
    Location: Plovdiv
    Posts: 110

    Jquery append()





    , HTML append() , html() ( )
    HTML ....

    ... DOM append() html() HTML DOM ...





    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
    
            <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    
            <title>Js_append_and_selectors</title>
    
            <script src="http://code.jquery.com/jquery-latest.js"></script>
    
        </head>
        
        <body>
    
            <div>
               <p>safsgf</p>
            </div>
    
            <input type="submit" name="" value=" add " />    
    
            
            <script type="text/javascript">
                $(document).ready(function(){
    
                    $("p").click(function(){
    
                        alert('selector work');
    
                    });
         
                    $("input").click(function(){
    
                        $('div').append('<p>test</p>')
    
                    });
    
                });
            </script>    
    
    
        </body>
    </html>

    ... .live() .delegate() ...

  2. #2
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    . . event-, bind- (onclick ) - . , . bind- .

    .live() . 1.7 deprecated, .on() .delegate(), .
    , !

  3. #3
    Registered User
    Join Date: Sep:2009
    Location: Plovdiv
    Posts: 110
    ...
    ... , Js (... , , : " " .... )

  4. #4
    Registered User
    Join Date: Jul:2005
    Location: Sofiq
    Posts: 2,798
    Quote Originally Posted by shst View Post
    ...
    ... , Js (... , , : " " .... )
    - http://www.quirksmode.org/js/contents.html

  5. #5
    Registered User
    Join Date: May:2006
    Location:
    Posts: 729
    Quote Originally Posted by shst View Post
    ...
    ... , Js (... , , : " " .... )
    - reference/tutorial JavaScript https://developer.mozilla.org/en/JavaScript/Guide.

    - , http://www.youtube.com/watch?v=hQVTIJBZook .
    jQuery, stackoverflow.com .

  6. #6
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    - !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |