SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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>

share|improve this question
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 '13 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. – user2054069 Mar 21 '13 at 17:26
<script> $(function() { $( "#accordion" ).accordion(); }); <script> This code also I added in sharepoint designer. – user2054069 Mar 21 '13 at 17:28
Did you check in? Publish? – harsimranb Mar 21 '13 at 17:43

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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