Hello.
To load jQuery libraries into your custom ascx file you can use general .NET methods:
ClientScriptManager csm = Page.ClientScript;
csm.RegisterClientScriptInclude("verticalscroll", ResolveClientUrl("~/js/file.js"));
Or our API and corresponding method in
CMS.GlobalHelper.ScriptHelper class.
Since this code is a part of the web part, it loads the code when web part is placed on a page only.
Best Regards,
Radek Macalik