Accordion's Options Problem Since Jquery 1.9

Hi all, I recently upgrade my framework. I read the new documentation of jQuery 1.9 in order to find my problem related to accordion widget however after some hours of research I didn’t succeed.

With jQuery 1.8.22 it worked perfectly, here is the options of my accordions : (using yii)


'options'=>array(

        //'animate'=>'js:{duration:200,down:{easing:"easyOutBonce",duration:1000}}',

        'heightStyle'=>"content",

        'collapsible'=>true,

        'create'=>"js:function(event,ui) {

            if (($.cookie('accordion') != null) && ($.cookie('accordion') != 'false')) {

                myact = parseInt($.cookie('accordion'));

            }

        }",

        'activate'=>"js:function(event,ui) {

            myact = ui.options.active;

            $.cookie('accordion', null, { expires: 2, path: '/' });

            $.cookie('accordion', myact, { expires: 2, path: '/' });

        }",

        'active'=>"js:($.cookie('accordion') == null) ? 0 : ($.cookie('accordion') == 'false') ? false : parseInt($.cookie('accordion'))",)));

I could keep the accordion state after refresh or going to another page. But with jQuery 1.9 it doesn’t work anymore… I tried many many things but never reach it working.

I guess it comes from "activate" or "create" cause the cookie is still filled with the same value… I tried to substitute myact in "activate" by an integer but nothing happens…

If you can help me. Thanks.

Ok I Solved it, I replaced “ui.options.active” by “$(this).accordion(‘option’,‘active’)” =)