I’m currently building an e-commerce site in wordpress using the WP-ecommerce plugin.In product page, the stock is updated after you select an attribute(size, color etc). It basically shows if the product is in stock or not. The text gets cufon when the page loads, but after the stock is updated, that is you select an attribute, the test suddenly loses cufon as well as the small shopping cart in the sidebar. I have no idea what is causing the problem. you can see the site here : http://tinyurl.com/43pd8br . Thanks for helping!
Leave a Reply
You must be logged in to post a comment.
You’ll need to call cufon again after the text is updated. Unlike CSS, which applies a style to any element matching the selector now and in the future of the page, Cufon is JS, meaning it responds to events.
When you first load your page, you are applying cufon – so it goes and finds all the matched elements and does its thing, then it’s done. When you update your text without a page load, cufon is not aware of this – as far as knows, it’s done its job and has finished.
So what you need to do is a callback – in the script that dynamically updates your text, add your cufon actions once the update has happened.