Having trouble with registering jquery accordion on webusercontrol code behind

Having trouble with registering jquery accordion on webusercontrol code behind

Hello everyone, I am trying to register a jquery accordion on a dynamically loaded usercontrol. Here is the situation:

The parent page has a asp menu control and a placeholder control, when the menu option is clicked, the corresponding webusercontrol is loaded into the placeholder control on the parent page.

This is how I registered datepicker control on the .ascx (usercontrol) code behind


protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        String script = "$(document).ready( function(){ $('#" + txtArrivalDate.ClientID + "').datepicker();  }  );";
        ScriptManager.RegisterClientScriptBlock(base.Page, base.Page.GetType(), String.Format("jQuery_{0}", txtArrivalDate.ClientID), script, true);

    }

This works fine,

However the problem I am having is with registering plugins like accordion and the modal-form on code behind, this is a little confusing to me as the codes have some css and  I also  have little knowledge on jquery and using scripts in general

Your suggestions are well appreciated, thanks