Also! If you do something really cool with this module, please post in our community section under "Share Tips & Ideas"!
- You should now be on the JS Injector listing page. This page will show you a list of the scripts that you've created to be used on your site.
- Click the "+ Add" link to create a new script.
- You should now have a blank JS Injector script dialogue.
- Fill out the required fields
- Add your JS code (don't forget you don't need to use <script> tags)
- Configure where/when you'd like the script to show up.
- Once you are at a point where you'd like to save your work, click "Save".
- You will be brought back to the JS Injector listing page where you can see your newly added script. You can now do the following with your script:
- jQuery is available to be used on your site! You may choose between:
- 1.5 (default)
- 1.7 (recommended for extra fun)
- 1.8 (not recommended, bleeding edge, things like Views will break)
- To choose your jQuery version, do the following:
- Navigate to your sites jQuery Update page by using the administrative toolbar. Navigate to "Configuration" → "Development" → "jQuery update".
- Select the version you would like to use from the dropdown
- Save Configuration
- Feel free to use jQuery in your JS Injector scripts!
- If you are feeling adventerous and want to implement your scripts the Drupal way, then do it using Drupal.behaviors!
- JS Injector is a very powerful module. Please keep in mind that there could be the rare occassion of custom scripts and/or plugins that you use causing conflicts with other scripts on your site. We are happy to provide the module and encourage its use, but we cannot provide support for the myriad of scripts and plugins out there. It is up to you to use the module wisely :). So remember: