NAVIGATION
This shows you the differences between two versions of the page.
|
english:technics:internal-function-call:script-into-head-area [2011/08/31 00:46] Knut Heermann (flip-flop) |
english:technics:internal-function-call:script-into-head-area [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 97: | Line 97: | ||
| \\ | \\ | ||
| + | === JavaScript: === | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: {TEMPLATE}inc_js/calendarDateInput/calendarDateInputX.js --> | ||
| + | <!-- JS: {TEMPLATE}inc_js/MyFolder/MyScript.js --> | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | - Integrate plugins (jQuery) e.g. using the files: | ||
| + | * template/lib/jquery/plugin/ui-1.8.custom.min.js | ||
| + | * template/lib/jquery/plugin/jquery.easing.min.js | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: ui-1.8.custom.min --> | ||
| + | <!-- JS: easing.min --> | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | Similarly, for MooTools: | ||
| + | |||
| + | Load Plugin or More as described and based on current JavaScript framework/library. It will also render <srcipt src="" /> in head. | ||
| + | |||
| + | - Integrate e.g. MooTools 1.2x with the files in: | ||
| + | * template/lib/mootools/plugin-1.2/mootools.flext.js | ||
| + | * template/lib/mootools/plugin-1.2/mootools.Quickie-yui.js | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: flext --> | ||
| + | <!-- JS: Quickie-yui --> | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | - Loading More Components: | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: myplugin --> | ||
| + | <!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion --> | ||
| + | </code> | ||
| + | \\ | ||
| + | |||
| + | - And the best now is multi line JavaScript put as <script /> in head section. | ||
| + | |||
| + | Be aware – every equal JavaScript section like used in looped Content Parts is rendered only once. \\ | ||
| + | To be detected as JavaScript it will need ##%%;%%##, ##%%//%%## und/oder ##%%/*%%##. \\ | ||
| + | Just end your JavaScript line by ##%%;%%## is the safest way: | ||
| + | |||
| + | <code js> | ||
| + | <!-- JS: | ||
| + | // My Custom JS | ||
| + | alert('hey dude it works as expected'); | ||
| + | --> | ||
| + | </code> | ||
| \\ | \\ | ||