Why is wrong with this JS function? Firefox does work but Chrome doesn't
<p>Hi, I have been coding a little Js function that manipulates certains divs and elements. On firefox it works great, but it does not work in Chrome and halts all the Javascript. I simply don't find what is wrong. Could you be kind enough to let me know? Cookies were tested and work fine. Using Jquery. Thanks!</p>

<pre><code>function RememberMe(addr, bycookie = false)
{
    // Cookie name
    cookiename = "LBETS";

    // Should we reset?
    reset = false;
    changed = false;

    // See if button pressed
    if($(".star_"+ addr).hasClass("active"))
    {
        $('#recent_tx').addClass("table-striped");
        $(".star_"+ addr).removeClass("active");
        reset = true;
    } else {
        $(".favstar").removeClass("active");
    }

    // Iterate rows
    $('#recent_tx tr').each(function(){
        if($(this).hasClass(addr))
        {
            if(reset)
            {
                $(this).removeClass('warning');
            } else {
                $(this).addClass('warning');
                changed = true;
            }
        } else {
            $(this).removeClass('warning');
        }
    })

    // Change class
    if(changed)
    {
        $('#recent_tx').removeClass("table-striped");
        $(".star_"+ addr).addClass("active");
        setCookie(cookiename, addr, 20*365);
    }

    // Reset 
    if(reset)
    {
        delCookie(cookiename);
    }
}
</code></pre>
