hi everyone, first of all I am sorry if i put this post in the wrong category, I couldn't find a YUI section. second, I know this is probably a stupid question so bear with me
I am trying to dynamically load script and css files (1 file each). for the script, I call o.purge() inside the success hander function, so that's not a problem. however for the css, when I do call the purge function I lose the effects of the css rules. and If I don't call purge, the css links keep adding up as I load more and more css files, which is not good.
so to summarize, is there a function or a way, I can for instance automatically purge the css link as soon as I load a new one. Or better is it possible to Get.css() the link in one node, and have them replace each other as each new one is loaded. thank you
I just solved the issue. on the success handler of the css get method, you can save the function arguments which have access to purge into another variable. then we can call the purge method through that object anytime needed.