RailsCasts Pro episodes are now free!

Learn more or hide this

Ben Eggett's Profile

GitHub User: beneggett

Site: www.beneggett.com

Comments by Ben Eggett


Absolutely, you can do whatever you want in your steps views.


Here's a useful jquery snippet for anyone looking to do jquery powered transitions on their PJAX calls:

Simple slide down

//jQuery =>
$('#PJAXcontainer').bind('start.pjax', function() { $('#PJAXcontainer').hide() }).bind('end.pjax', function() { $('#PJAXcontainer').slideDown(250) });

could also be used for Fades, etc.

// jQuery =>
$('#PJAXcontainer').bind('start.pjax', function() { $('#PJAXcontainer').fadeOut(500) }).bind('end.pjax', function() { $('#PJAXcontainer').fadeIn(500) });

Should go without saying to use it in $(document).ready function, or similar.