/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); /******************************************************************************/ integer face = 4; string externalJavascript = "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"; default { state_entry() { string dataURI = "data:text/html," + "<head><script src='" + externalJavascript + "'></script></head>" + "<button>Toggle</button>" + "<p>Hello<br />World</p>" + "<script>$('button').click(function () " + "{$('p').slideToggle('slow');});</script>"; llSetPrimMediaParams(face, [PRIM_MEDIA_CURRENT_URL, dataURI]); } }