If you do, check your render mode. It's better to not set it in your case, so the object writes all necessary data to the document.
Check the documentation "63.2.1.4. Refactoring jQuery environment with setRenderMode()"

Thorsten

Posted by Jay M. Keith (jmkeith) on 2009-04-20T13:25:50.000+0000

It would be especially nice if there was a way to set the protected $_elementHtmlTemplate variable. Or as mentioned above, have the correct HTML. The example that the original poster displayed is incorrect HTML (note the use of unordered lists with no list item tags after).

I find it not usefull to change the used html template for the accordion element. Instead it should simple create correct markup. If you need an element with changed markup, extend the element and overwrite $_elementHtmlTemplate. For this reason benjamin used protected and not private declaration for this variable.

Thorsten Ruf

Posted by Jay M. Keith (jmkeith) on 2009-04-20T17:58:30.000+0000

In my current practice I have simply extended the element. However, upon seeing this bug report, I felt the current examples that jQuery UI uses (like the example you provided), would be more appropriate than the current template that is set for this, and other UI components.

Posted by Pedro Simões (simoesp) on 2009-04-21T04:23:45.000+0000

after changing the $_elementHtmlTemplate variable in the helper it started to work

thnx

;-)

Posted by Benjamin Eberlei (beberlei) on 2009-04-22T20:59:41.000+0000

I'll look into it, but i have to check if your proposed accordion structures work with UI 1.5 as well, so that the helper works on both.

Posted by Benjamin Eberlei (beberlei) on 2009-04-22T21:00:32.000+0000

Changed priority to minor, because overriding is possible

Posted by Thorsten Ruf (saphir2k) on 2009-04-23T00:19:48.000+0000

Hi Benjamin,

i'm sorry, but i really can't understand the priority change. If you leave the code as it is at the moment, a beginner have to extend the Element and overwrite the template variable. I appreciate your work a lot, but if you take a look at the documentation only one or two elements are working "out of the box" with the actual version of jQuery. I spent a lot of time to fix some elements, because i need the latest versions.

At the moment you can download UI as follwoing:
"Current (stable) (1.7.1: jQuery 1.3+)" or
"Legacy (1.6: jQuery 1.2.6)".

@pedro: i run in the same issue, i just added the Jquery accordion call myself with
<?= $this->jQuery()->addJavascript('$("#navigation").accordion({})'); ?> than i noticed that if i call addJavaScript the code is printed.
it looks like: