Posted By

ariunbolor on 07/22/11


Tagged

js jquery external


Versions (?)

Calling external JS or JQuery


 / Published in: JavaScript
 

  1. var jqscript=document.createElement('script');jqscript.setAttribute("type","text/javascript");jqscript.setAttribute("src","http://code.jquery.com/jquery-latest.js");document.getElementsByTagName("head")[0].appendChild(jqscript);
  2.  
  3.  
  4.  
  5.  
  6. /******************************************************************************/
  7.  
  8.  
  9.  
  10. integer face = 4;
  11. string externalJavascript =
  12. "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";
  13. default
  14. {
  15. state_entry()
  16. {
  17. string dataURI = "data:text/html," +
  18. "<head><script src='" + externalJavascript + "'></script></head>" +
  19. "<button>Toggle</button>" +
  20. "<p>Hello<br />World</p>" +
  21. "<script>$('button').click(function () " +
  22. "{$('p').slideToggle('slow');});</script>";
  23. llSetPrimMediaParams(face,
  24. [PRIM_MEDIA_CURRENT_URL, dataURI]);
  25. }
  26. }

Report this snippet  

You need to login to post a comment.