wie man DIV auf andere Divs

Lade ich meinen code auf jsFiddle, da siehst du es.

http://jsfiddle.net/SrT2U/2/

Wenn Sie auf den link klicken, die versteckten FAQ-Bereich wird sich zeigen, und Sie schieben andere divs nach unten. Aber das ist nicht das, was ich will, ich brauche alle anderen divs bleiben, wo Sie sind, und meine versteckte FAQ Sektion schwimmen auf der Oberseite. Nicht sicher, wie es zu tun. Auch nicht sicher, ob dies durchgeführt werden soll in HTML, CSS oder jQuery.

Mein jQuery-code:

$(function(){
    $(".OpenTopMessage").click(function () {
        $("#details").slideToggle("slow");
    });
});

HTML-code:

<div style="border: 1px solid #000;">
    <span>link</span>
    <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
    <span>link</span>
    <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
    <span>link</span>
    <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
    <span>link</span>
    <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
    <span>link</span>
    <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
</div>

<div id="faqBox">
   <table width="100%">
<tr><td><a href="#" id="openFAQ" class="OpenTopMessage">this is hte faq section</a></td>
</tr>
    </table>

    <div id="details" style="display:none">
    <br/><br/><br/><br/><br/><br/><br/><br/>
 the display style property is set to none to ensure that the element no longer affects the layout of the page
 <br/><br/><br/><br/><br/><br/><br/><br/>
    </div>
</div>
<br/><br/>
<div style="background:#c00;">other stuff heren the height reaches 0 after a hiding animation, the display style property is set to </div>  
beim nächsten mal kann man auch die Krypta der css für eine einfache Lesung ?

InformationsquelleAutor qinking126 | 2012-11-17

Schreibe einen Kommentar