Advertisement
Guest User

Untitled

a guest
Jul 18th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Loading HTML snippets with yepnope/modernizr.load()
  2. scriptArray.push({
  3. load: "noexec!domain.com/template/default/"+widgetType,
  4. callback: function (url, result) {
  5. console.log("Template loaded!");
  6. // code to handle response body should go here
  7. }
  8. })
  9.  
  10. $template = file_get_contents($requestFilepath);
  11. $template = str_replace("r","",$template);
  12. $template = str_replace("n","",$template);
  13. $template = str_replace("t","",$template);
  14. $template = str_replace("rn","",$template);
  15. $template = str_replace(""","'",$template);
  16.  
  17. echo 'var template = "'.$template.'"';
  18.  
  19. $("body").append('<script type="text/html" id="tpl_'+templateName+'">'+template+'</script>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement