I have a page which uses a lot of jQuery code but it is becoming unmanageable. I want to be able to tidy it up to place related parts into separate .js files and include them onto the page in a script tag.
I seem to be able to do this by creating them as jQuery plugins then by using $(document).plugin_name(); on the page.
Is it okay to do this or is there a better/easier way?
Thanks