Update javascript.md fixes #3652

I needed to know how to do this to do some jQuery manipulation in the CMS.
This commit is contained in:
Josh Kosmala 2014-11-18 14:28:55 +13:00 committed by Daniel Hensby
parent e5bed94d07
commit 2e416b60f3

View File

@ -50,6 +50,15 @@ code or any other framework code.
})
})(jQuery);
### Custom jQuery/JavaScript in the CMS
To call additional Javascript or jQuery files in to the CMS, edit your mysite/config/config.yml file as follows:
:::javascript
LeftAndMain:
extra_requirements_javascript:
- '/path/to/file.js'
### jQuery Plugins
A jQuery Plugin is essentially a method call which can act on a collection of DOM elements. It is contained within the `jQuery.fn` namespace, and attaches itself automatically to all jQuery collections. The basics for are outlined in the