Problems Bootstrap´s carousel and safari
<p>I have an ask without solution. I am working with jquery and bootsrap for making a dynamic web, so I have written all html code to javascript. Now I have put the html code of carousel bootstrap to jquery code, but it doesn´t work in safari (in firefox doesn´t exist any problem). I don´t know if there is any incompability or maybe I have done something bad.</p>

<p>Thanks</p>

<pre><code>$("#container").html("&lt;header class='jumbotron subhead' id='overview'&gt;"
                                +"&lt;h1&gt;Ps&lt;/h1&gt;"
                                +"        &lt;div class='subnav'&gt;"
                                +"            &lt;ul class='nav nav-pills'&gt;"
                                +"                &lt;li&gt;&lt;a href='#' 
        onClick=\"javascript:mostrar2('#consultoria')\"&gt;Consultoría y asesoría&lt;/a&gt;&lt;/li&gt;"
                                +"                &lt;li&gt;&lt;a href='#' 
        onClick=\"javascript:mostrar2('#hidraulica')\"&gt;Obra hidráulica&lt;/a&gt;&lt;/li&gt;"
                                +"                &lt;li&gt;&lt;a href='#' 
        onClick=\"javascript:mostrar2('#electrica')\"&gt;Obra eléctrica&lt;/a&gt;&lt;/li&gt;"
                                +"                &lt;li&gt;&lt;a href='#' 
        onClick=\"javascript:mostrar2('#industria')\"&gt;Industria&lt;/a&gt;&lt;/li&gt;"
                                +"                &lt;li&gt;&lt;a href='#' 
        onClick=\"javascript:mostrar2('#mineria')\"&gt;Mineria&lt;/a&gt;&lt;/li&gt;"
                                +"            &lt;/ul&gt;"
                                +"        &lt;/div&gt;"
                                +"    &lt;/header&gt;"

                                +"&lt;section id='consultoria'&gt;"
                                +"&lt;div class='page-header'&gt;"
                                +"&lt;h1&gt;Consultoría y asesoría&lt;/h1&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;div class='row'&gt;"
                                +"&lt;ul&gt;"
                                +"    &lt;li&gt; Lalalalaa"
                                +"         lalalalala"
                                +"    &lt;/li&gt;"

                                +"    &lt;li&gt; Lalalalaa"
                                +"         lalalalala"
                                +"    &lt;/li&gt;"
                                +"&lt;/ul&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;br/&gt;&lt;br/&gt;"
                                +"&lt;div class='span12'&gt;"
                                +"&lt;div class='row-fluid'&gt;"
                                +"&lt;div class='span2 columns'&gt;&lt;/div&gt;"
                                +"&lt;div class='span8 columns'&gt;"
                                +"  &lt;div id='myCarousel' class='carousel slide'&gt;"
                                +"    &lt;div class='carousel-inner'&gt;"
                                +"      &lt;div class='item active'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-01.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;First Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"      &lt;div class='item'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-02.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;Second Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"      &lt;div class='item'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-03.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;Third Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"    &lt;/div&gt;"
                                +"    &lt;a class='left carousel-control' href=\"#myCarousel\" data-slide='prev'&gt;&amp;lsaquo;&lt;/a&gt;"
                                +"    &lt;a class='right carousel-control' href=\"#myCarousel\" data-slide='next'&gt;&amp;rsaquo;&lt;/a&gt;"
                                +"  &lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;br/&gt;&lt;br/&gt;"         
                                +"&lt;/section&gt;"

                                +"&lt;section id='hidraulica'&gt;"
                                +"&lt;div class='page-header'&gt;"
                                +"&lt;h1&gt;Obra hidráulica&lt;/h1&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;div class='row'&gt;"
                                +"&lt;ul&gt;"

                                +"    &lt;li&gt; Lalalalaa"
                                +"         lalalalala"
                                +"    &lt;/li&gt;"

                                +"    &lt;li&gt; Lalalalaa"
                                +"         lalalalala"
                                +"    &lt;/li&gt;"

                                +"&lt;/div&gt;"
                                +"&lt;br/&gt;&lt;br/&gt;"
                                +"&lt;div class='span12'&gt;"
                                +"&lt;div class='row-fluid'&gt;"
                                +"&lt;div class='span2 columns'&gt;&lt;/div&gt;"
                                +"&lt;div class='span8 columns'&gt;"
                                +"  &lt;div id='myCarousel1' class='carousel slide'&gt;"
                                +"    &lt;div class='carousel-inner'&gt;"
                                +"      &lt;div class='item active'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-01.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;First Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"      &lt;div class='item'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-02.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;Second Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"      &lt;div class='item'&gt;"
                                +"        &lt;img src='img/bootstrap-mdo-sfmoma-03.jpg' alt=''&gt;"
                                +"        &lt;div class='carousel-caption'&gt;"
                                +"          &lt;h4&gt;Third Thumbnail label&lt;/h4&gt;"
                                +"          &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.&lt;/p&gt;"
                                +"        &lt;/div&gt;"
                                +"      &lt;/div&gt;"
                                +"    &lt;/div&gt;"
                                +"    &lt;a class='left carousel-control' href=\"#myCarousel1\" data-slide='prev'&gt;&amp;lsaquo;&lt;/a&gt;"
                                +"    &lt;a class='right carousel-control' href=\"#myCarousel1\" data-slide='next'&gt;&amp;rsaquo;&lt;/a&gt;"
                                +"  &lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;/div&gt;"
                                +"&lt;br/&gt;&lt;br/&gt;"         
                                +"&lt;/section&gt;");
            $("#hidraulica").hide();
            $("#electrica").hide();
            $("#industria").hide();
            $("#mineria").hide();
            $('#myCarousel').carousel();
            $('#myCarousel1').carousel();

                        $('.carousel').carousel({
                           interval: 2000
                           })  



    });
</code></pre>
