You are here

2 February 2013

Rather than simply dumping the HTML into the page you might want it to be animated. You can .hide() the content before doing a .prependTo(), then call .slideDown() on the element.

Source code viewer
  1. // You can .hide() the content before doing a .prependTo(), then call .slideDown() on the element.
  2.  
  3. $('seletor-that-will-be-prepended').clone().hide().prependTo('selector-were-it-will-be-prepended').slideDown();
Programming Language: jQuery