Hello, can someone help me with this
I am trying to set a different color for the element from the click event.
The problem is that the mouseover event makes everything white again. So, I will never get to see the color off the active(actief)class.
What could I do, I already try'd putting in the line stopevent propagation()??
thanks, Richard
$("#tbestel_opties2 span").live("mouseover", function() {
$t=$(this);
if(!$t.hasClass('actief')){
$t.css({'color':'#fff','backgroundColor':'#fdc601'});
}
});
$("#tbestel_opties2 span").live("mouseout", function() {
$t=$(this);
if(!$t.hasClass('actief')){
$t.css({'color':'#333','backgroundColor':'#fdc601'}); }
});
$("#tbestel_opties input,#tbestel_opties2 span").live("click", function(e)
{e.stopPropagation();
$t=$(this);
$('#tbestel_opties2 .actief').removeClass("actief").css({'color':'#333'});
$t.addClass("actief")
$("#opties li:eq(0)").addClass("actief");
});