brian t schrieb: > I am trying to show a ul and switch the background image on the li element > that triggers the switch. I've got the show/hide working, but for the life > of me I can't get the backgroundimage targeted. > > Here is the jquery: > > $(document).ready(function(){ > $(".submenu").hide(); > $("li.side_menu-parent").toggle(function(){ > $(this).next().show(); > $(this).prev("li").css({backgroundIImage: > "url(../images/down_arrow.gif)"}); > }, function(){ > $(this).next().hide(); > $(this).css({backgroundimage: > "url(../images/right_arrow.gif)"}); > }); > });
Use backgroundImage (camelcase) or 'background-image' as property name: $(this).css({'background-image': "url(../images/right_arrow.gif)"}); You could also chain the methods: $(this) .css({'background-image': '...'}) .next().hide(); -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/