I have a problem with my page: on start page cufon-yui
is loaded fine, but when I go to another page, it doesn't load. But when I refresh, it looks fine. I use turbolinks.
Turbolinks works by replacing the page content instead of navigating to a new page. If you're calling cufon-yui on document.ready
, then it will NOT be called when you navigate to a new page. Your code should then look like:
$(document).on 'ready page:load', function(event)
{
Cufon.replace("whatever you're replacing");
// And whatever other Cufon code you're using is.
}
This way, it'll be called both when the document is ready, as well as when page:load
is called by Turbolinks upon the completion of the page loading process.