treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] jquery slideDown shakes content in Chrome

  • Hi,

    I'm relatively new to jquery and am trying to create a simple jquery content slider. It all worked fine when I was testing it on a seperate page, but when I added it to the website, in Chrome all the content "shakes" when the panels slide up or down.

    This is the code being used:

    function slide(obj,obj2,obj3,obj4,div){
      $("#" + obj).hide();
      $("#" + div).slideDown();
      $("#" + obj2).show();
      $("#" + obj3).hide();
      $("#" + obj4).fadeIn(2000);
    
    }
    function slideUp(obj,obj2,obj3,obj4,div){
      $("#" + obj).hide();
      $("#" + div).slideUp();
      $("#" + obj2).show();
      $("#" + obj3).fadeIn(2000);
      $("#" + obj4).hide();
    }
    

    Here is a link to it in use.

    Any help would be greatly appreciated! :)

  • I think it's the use of display:inline-block on #mainbody and #mainbodycontent that you want to avoid.

  • Ah! Thank you very much! I changed that and now it works perfectly!