I’m trying to add a jquery splitter plugin. I use the registerscript method to add the splitter.js and a function to be executed when the document is ready to get the actual splitter. The css is loaded in the main, together with other css-files.
This results in an error, that jquery is not defined (Uncaught ReferenceError: jquery is not defined)
and afterwards the splitter is not executed cause it’s not defined, giving an alert.
from what you said the script is probably placed before the jquery is included. So try changing CClientScript::POS_HEAD to CClientScript::POS_END to insert it in the end of your page
Sorry, but it didn’t work. However, it made me realize that I use the wrong register-method. I should use the registerScriptFile as I want to include a script file, not a script. So now the file is loaded, even with the POS_HEAD-option. When I added the CSS-file, it became a mess so that’s the next step.