title: Jquery UI - Accordion on asp.net
body: <p>Can't make work the simple 'accordion' script from JqueryUI on my asp.net page <code>.aspx</code>.</p>
  
  <p>I can't find good documentation on the accordion on these cirumstances, only simple html <code>&lt;p&gt;&lt;h3&gt;&lt;div&gt; etc...</code></p>
  
  <p>For example this is my code on the <code>aspx</code> page:</p>
  
  <pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/Zulcon_ppal.Master" AutoEventWireup="true"    CodeBehind="EnvianosTuCurriculum.aspx.cs" Inherits="Grupo_Zulcon.EnvianosTuCurriculum" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
  
  &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(function() {
  $( "#accordion" ).accordion({
    heightStyle: "content"
  });
  });
  &lt;/script&gt;
  &lt;style type="text/css"&gt;
  .curriculumContainer
  {
  width:90%;
  color:#646464;
  margin:30px auto;
  }     and then more page specific css... &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Then i want to try it with a title in a <code>&lt;div&gt;</code> but nothing happens:</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  
  &lt;div class="fixed-width-wrapper contentContainer"&gt;
  
  &lt;div style="padding:20px"&gt;
    &lt;div style="padding-bottom:5px; border-bottom:solid 1px #cccccc; background-image:url('images/menuzulcon3.png'); height: 59px; width: 953px;" class="titulosGeneral";&gt;&lt;/div&gt;
    &lt;div style="padding-bottom:5px; border-bottom:solid 1px #cccccc" class="titulosGeneral"&gt;Bachillerato&lt;/div&gt;
    &lt;div class="curriculumdivcompleto"&gt;
    &lt;div id="accordion"&gt;
    &lt;div class="curriculumLadoRegistroizq"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Lugar (Ciudad, Pais)&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="Lugar_pri" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistro2"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Nombre de la Institución&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="Insti_pri" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistroizq"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Año titulación&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="año_pri" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistro2"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Años cursados&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="cursados_pri" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div&gt;&amp;nbsp;&lt;/div&gt;
    &lt;div style="padding-bottom:5px; border-bottom:solid 1px #cccccc" class="titulosGeneral"&gt;Formación Superior&lt;/div&gt;
    &lt;div class="curriculumLadoRegistroizq"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Lugar (Ciudad, Pais)&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="Lugar_sec" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistro2"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Nombre de la Institución&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="Nombre_sec" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistroizq"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Titulo obtenido&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="titulo_sec" runat="server" MaxLength="100" ValidationGroup="Curriculum" CssClass="autenticacionTextBox"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistroizq2"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Año de titulación&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="año_sec" runat="server" MaxLength="25" ValidationGroup="Curriculum" CssClass="autenticacionTextBoxReducido"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="curriculumLadoRegistroizq3"&gt;
      &lt;div style="margin-top:10px" class="autenticacionTitulo"&gt;Semestres cursados&lt;/div&gt;
      &lt;div style="margin-top:5px"&gt;&lt;asp:TextBox ID="Semestre_sec" runat="server" MaxLength="25" ValidationGroup="Curriculum" CssClass="autenticacionTextBoxReducido"&gt;&lt;/asp:TextBox&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
    &lt;/div&gt;
      &lt;div style="text-align:right; margin-top:20px"&gt;&lt;asp:Button ID="Button3" runat="server" ValidationGroup="Curriculum" postbackurl="Envia4.aspx" OnClick="Register" CssClass="my_btn"/&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>I don't know if i'm doing something wrong, could anyone shed some light on this?</p>
  
  <p>Thanks in advance.</p>