I would like to add Jquery Accordion code for Sharepoint 2010. I have added jquery-1.9.1.js & jquery-ui.js file in _layouts\JScript folder. Now I want to add below code sharepoint designer. Please help where I can add this.

<div id="accordion">
<h3>Heading 1</h3>
<div class="accordion-content">
    <p>jQuery UI 1.10 includes dozens of bug fixes and improved accessibility. In addition, the dialog and progressbar widgets have undergone '</p>

  • Is this in a master page, page layout or something else? Where are you including the actually jQuery includes? What kind of problem are you seeing that is preventing you from doing this?
    – Dave Wise
    Mar 21, 2013 at 16:38
  • I have added JQuery files in .....\14\TEMPLATE\LAYOUTS\Jscript folder(custom folder). Then I added scriptlink _layouts/CustomJScripts/jquery-1.9.1.js. in Sharepoint designer for default loading. Then i added above Accordion code in Sharepoint designer but it didn't work. Mar 21, 2013 at 17:26
  • <script> $(function() { $( "#accordion" ).accordion(); }); <script> This code also I added in sharepoint designer. Mar 21, 2013 at 17:28
  • Did you check in? Publish?
    – harsimranb
    Mar 21, 2013 at 17:43

2 Answers 2


Use a CustomAction element with the target of ScriptLink, or a DelegateControl targeting AdditionalPageHead.


You may need to put your accordian script into a $(document).ready(); block as it sounds like it is executing either before the jQuery scripts are loaded or before the html itself has been fully loaded into the DOM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.