Trying to add an iframe using jQuery
I'm trying to add an iframe using jquery this way below, but when I click the link it doesn't happen anything. 

    <html>
    
    <head>
    
    <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js'></script>
    
    
    <script type="text/javascript">
    function fun(){
    
     
    $('<iframe />');  // Create an iframe element
    $('<iframe />', {
        name: 'frame1',
        id: 'frame1',
        src: 'http://www.programmingfacts.com'
    }).appendTo('body');
    
    </script>
    
    </head>
    
    <body>
    
    <a href="#" onclick="fun()">clica</a>
    
    </body>
    
    </html>

Regards

Javi
Trying to add an iframe using jQuery
===

I'm trying to add an iframe using jquery this way below, but when I click the link it doesn't happen anything. 

    <html>
    
    <head>
    
    <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js'></script>
    
    
    <script type="text/javascript">
    function fun(){
    
     
    $('<iframe />');  // Create an iframe element
    $('<iframe />', {
        name: 'frame1',
        id: 'frame1',
        src: 'http://www.programmingfacts.com'
    }).appendTo('body');
    
    </script>
    
    </head>
    
    <body>
    
    <a href="#" onclick="fun()">clica</a>
    
    </body>
    
    </html>

Regards

Javi