Changing background image on accordion change - jQuery Ui
        Posted  
        
            by Coughlin
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Coughlin
        
        
        
        Published on 2010-03-15T15:55:32Z
        Indexed on 
            2010/03/15
            15:59 UTC
        
        
        Read the original article
        Hit count: 298
        
I am using this code:
        $('.ui-accordion').bind('accordionchange', function(event, ui) {
            $(this).next().next().css({'background-image':'images/green-bg.jpg'});
        //ui.newHeader // jQuery object, activated header
  //ui.oldHeader // jQuery object, previous header
 // ui.newContent // jQuery object, activated content
 // ui.oldContent // jQuery object, previous content
});
To try to change the background image of the PREVIOUS header after it changes. I see that the jquery docs supply the object for oldHeader, but I am trying to change the CSS of that element. Any ideas how I would do that?
So You go to the next one it goes green, then the current one is going to be red.
Thanks,
Ryan
© Stack Overflow or respective owner