-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Body CSS classes not being updated #21
Comments
It should update the body class as well. Do you know which version of Turbolinks you're using? Is this on your website, http://olliekav.com/? |
It's not currently as it would break, I'm just making some updates. Let me push it to staging env so you can have a look. I'm using the Turbolinks bundled in the zip as I've been upgrading to your latest version (I was using the gem before). |
@ssorallen You can view it on http://staging.olliekav.com/ (olliekav:okdesign). All the portfolio pages should switch the body class so the background is a color. |
@olliekav, is your staging site running Rails? |
@ssorallen It's on Middleman(https://github.com/middleman/middleman), my repo is public if you want to see the setup https://github.com/olliekav/olliekav.com/tree/staging |
Okay thanks for the links. I can't immediately see what the problem is, but I will try to figure it out in the evenings this week. |
Thanks! No rush, I just couldn't work out what I was doing wrong (or if there was a bug). |
This was down to the version of Turbolinks after playing around with it again, instead of the version included locally I used the gem from master...
And now its all working fine. For anyone using Middleman you'll need to use |
Maybe not quite there just yet, body class is updated but for the life of me I can't get the background-color to animate with CSS. Will investigate further. |
Thanks for tracking down the Turbolinks version problem. I will try to check out the background-color transitioning problem this weekend. Sorry for the delay. |
@ssorallen No worries, I had a spare 30min so thought I would have another play with it. If you go on http://staging.olliekav.com/ (olliekav:okdesign) you can see the body class updates are applied, but for some strange reason the css transition never occurs. Best way I've found to test is this one... http://staging.olliekav.com/work/alfred-app/ Then use the next link when you scroll to go to http://staging.olliekav.com/work/rebellion-games/ They have body class of |
@olliekav toss a I ran into issues where including text containing |
mmmmmm |
@sickslives Thanks I'll give that a shot. |
@olliekav I just switched to |
@sickslives Good to know, thanks. First chance I've had to go back and have a look at this! |
@olliekav I'm actually not using turbo-react to achieve page transitions/animations anymore, if you don't have too many moving parts it's actually really easy to just use the events turbolinks provides to fire exit animations on $(document).on 'page:change', ()->
setTimeout ()->
$('body').addClass('somecolor')
, 0 |
I'm trying to animate body colours between pages but my body CSS classes are not being updated.
e.g. this code won't work
It only seems to work if I add a wrapper div inside the body as this is replaced.
Is this expected behaviour, I thought it looked for differences on the body and applied these?
The text was updated successfully, but these errors were encountered: