Menu is not working

You have to format HTML code that you post here. Somehow the forum’s editor uses HTML tags to format content.

But I guess the culprit is this line:

$(this.selector).addclass('active');

I think you meant

$(this).addClass('active');
// ....... ^ look here; uppercase C