I think you're html may be buggy. You shouldn't have DIVs or Ps nested
inside other Ps. The outer P should be changed to a DIV. The inline styles
you have on the outer P might also be involved. But I'm no CSS guru.

Blair

On 11/25/06, Alexander Petri <[EMAIL PROTECTED]> wrote:

Hi i done this little function to dynamicaly fold out comments to a blog
but if i say hide comments with the function toggle
the comment div dissapears but there is a lot of free space there
the "html" below the comment wont slide up
How can i fix that?
i hope you understand my problem

$("[EMAIL PROTECTED]'kommentar\']").click(function(e){
                  e.preventDefault();
                  var href=$(this).href();
                  var me = this;
                  $.get(href,function(response) {
                    $(me).parent().append(response).slideDown("slow");
                  });
                  $(this).html("hide comments");
                  $(this).unbind("click");
                $(this).toggle(function(){
                      $(this).next("div").slideUp("fast");
                    $(this).html("show comments");
                },function(){
                      $(this).next("div").slideDown("fast");
                    $(this).html("hide comments");
                });
            });

the html looks similar like this

<body ap:processed="true">
<div id="content">
        <h1>Mein Blog</h1>
                <h2>Erster Eintrag</h2>
                <p>Nach einem Erdbeben</p>
                <p style="overflow: visible; display: block; height:
369px;"><a href="blog/comments_inline/1" name="kommentar">hide comments</a>
                <div id="comment">
                <h3>ich:</h3>
                <p>ok</p>

                <h3>test:</h3>
                <p>test</p>
                <h3>ghjghj:</h3>
                <p>ghjghj</p>
                <h3>ertert:</h3>
                <p>ertert</p>

        </div></p><h2>Fahnder durchsuchen Siemens- Büros</h2>
                <p>Großrazzia bei Siemens</p>
                <p><a href="blog/comments_inline/2"
name="kommentar">Kommentar</a>
        </p></div>
</body>



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to