开发者

Accordian not working with all my data

开发者 https://www.devze.com 2023-01-20 10:27 出处:网络
I am using this according plugin link text the 3rd one down...3: Non-accordion (standard expandable menu) and each li looks like this

I am using this according plugin link text the 3rd one down...3: Non-accordion (standard expandable menu) and each li looks like this

<li>
<a href="#">Burswood Dome - Burswood Wa, Australia</a>
        2010-10-04
        <ul class="acitem">
              <br><input id="yes_song1" name="yes" type="radio" value="song[1]" />
              Yes
              <br><input id="no_son开发者_高级运维g1" name="no" type="radio" value="song[1]" />
              No
                <li>master of puppets</li>
</ul>
</li>

Any reason why the accordion is not working because if i use just li with text it works fine...


You need to make sure that LIs are the only children of the UL element. Also, even though you shouldn't have a br element as a direct child of a ul, you should write <br /> instead of <br>.


The reason why the script is breaking is because http://jqueryui.com/demos/accordion/

The markup of your accordion container needs pairs of headers and content panels:

So it should be alternating elements, one for a header, one for content. Mine is a pair of divs, with css class names accHeader and accContent, like thus:

<div class='accHeader'>... blah blah blah ... </div>
<div class='accContent'> ... blah blah ... </div>
<div class='accHeader'>... blah blah blah ... </div>
<div class='accContent'> ... blah blah ... </div>
<div class='accHeader'>... blah blah blah ... </div>
<div class='accContent'> ... blah blah ... </div>

And my accordion works just fine. Also, bear in mind that you can nest whatever you want inside a div. Including <br />s


I had the same problem but in my case it was because I had used the usual 'Script Manager" instead of using the "Toolkit Script Manager". Try swapping and it might work fine. Also if I am right 'Toolkit Script Manager' is the superset of 'Script Manager'

Hope I was able to help.

0

精彩评论

暂无评论...
验证码 换一张
取 消