untested, but the point is you can pass an object as the second
parameter of the .bind() function.  Doesn't work with the shortcuts as
far as I know.  Then, you can access those object in the event.data
property of the event passed into the function.

$("#artigos_listagem li").mouseover(function(e){
                var orgBg = $(this).css('background');
                $(this).css({
                    background: "#ffffaa"
                });
            });
            $("#artigos_listagem li").bind('mouseout', { 'orgBg' :
orgBg}, function(e){
                $(this).css({
                    background: e.data.orgBg
                });
            });

I'm also not quite sure what you are attempting... it looks like those
li are getting a mouseover/mouseout  function that sets the background
to one color when rolling over and to another when rolling off.  If
that is the case:

$("#artigos_listagem li").toggle(function() {
  $(this).css({'background':'#ffffaa'});
},
function() {
  $(this).css({'background':'#aaffff'});
})

If the colors aren't known beforehand, since you are setting it
dynamically on li's with different background colors then you could
save the current background color as a custom attribute using .attr()
or as data on the object using .data()

http://docs.jquery.com/Internals/jQuery.data

Reply via email to