Kann nicht Aufhören, YouTube-Video in Versteckte DIV-Wiedergabe im hintergrund

Ich habe versucht, verschiedene Dinge, aber kann nicht ein YouTube-video in einem versteckten DIV-Element zum stoppen der Wiedergabe im hintergrund, bevor das DIV-toggle ist auch angeklickt. visibility:hidden nicht scheinen, um das Problem zu lösen. Hier ist der code, den ich verwende. Hoffe mir kann jemand helfen! Ich kann schalten Sie die automatische Wiedergabe, um es zu lösen, aber es bedeutet dann, dass die Benutzer klicken müssen, um eine zusätzliche Taste (die YouTube-Schaltfläche "spielen") das ist nicht ideal.

** IN DIE VON DER WEB-SEITE:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function(){

        $(".productDescription").hide();
        $(".show_hide").show();

    $('.show_hide').click(function(){
    $(".productDescription").slideToggle();
    return false;
    });

});

</script>

** IN DEN KÖRPER:

<div class="productDescription">

<iframe width="715" height="440" src="http://www.youtube.com/embed/BLbTegvRg0U?&amp;wmode=transparent&amp;autoplay=0" frameborder="0" allowfullscreen></iframe> 
<div class="closebutton"><a href="index.php" onClick="javascript:location.replace(this.href);" class="show_hide">Close Video</a>
</div>
</div>

** UND IM STYLESHEET:

.productDescription {
display: block;
position:absolute;
left:0px;
top:-2px;
z-index:5;
background-color: #000;
margin: 0px;
float: left;
padding: 0px;
width: 715px;
min-height: 600px;
height: 600px;
}

.show_hide {
display:none;
}

.closebutton {
display: block;
width:120px;
height: 22px;
position:absolute;
left:20px;
top:50px;
background-color: #000;
padding-top: 3px;
float: left;
z-index: 9999;
}

Vielen Dank im Voraus!

InformationsquelleAutor 0rchard | 2012-12-03

Schreibe einen Kommentar