I'd like to store the this file and it's path in a variable somehow like so:
var interaction ="css/interaction1/styles.css";
As later on I need to wait until this file loads before performing an action, ie wait until dynamically loaded CSS file loads before loading the content.
$(interaction).load(function(){
loadContent();
});
But I get a syntax error:
Error: Syntax error, unrecognized expression: css/interaction1/styles.css
How can I do this?