JQuery
From SmartWiki
Revision as of 08:46, 31 October 2012 by Cameron (talk | contribs) (Created page with 'If you wish to use jQuery you should include the following script tags within a Browser Script custom field, or on the Template Page if appropriate. <script type="text…')
If you wish to use jQuery you should include the following script tags within a Browser Script custom field, or on the Template Page if appropriate.
<script type="text/javascript" src="/jquery/jquery.js"></script> <script type="text/javascript" src="/jquery/jquery-ui.min.js"></script>
If the jQuery is to be used on a Web Page View custom field you must use the following method rather than using script tags:
<head> <script language="JavaScript"> function include_dom(script_filename) { var html_doc = document.getElementsByTagName('head').item(0); var js = document.createElement('script'); js.setAttribute('language', 'javascript'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', script_filename); html_doc.appendChild(js); return false; } function includejsfiles() { include_dom("/jquery/jquery.js"); include_dom("/jquery/jquery-ui.min.js"); } </script> </head> <BODY onload="includejsfiles()"> ...