Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Ben Eggett's Profile

GitHub User: beneggett

Site: www.beneggett.com

Comments by Ben Eggett

Avatar

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

Avatar

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

Simple slide down

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

could also be used for Fades, etc.

javascript
// 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.