Hello,

sorry in advance for this studipe question, but I'm kind of new to js so here goes:
I've got this two methods:
PHP Code:
function register() {
    for(var 
1<= 6i++) {
        $(
"#nl_" i).click(function(event) {
             
// does not work
            
activate(document.getElementById("nl_" i), document.getElementById("ni_" i));
             
// works fine
            
$(document.getElementById("nl_2")).attr("class""navi_link_active"); 
        });
    }
}

function 
activate(navi_linknavi_img) {
    $(
navi_link).attr("class""navi_link_active");
    $(
navi_img).attr("class""navi_img_active");

My activate method does not work. In contrast the test method with "nl_2" does work fine. I can't find the mistake I made.

Thanks you!