add javascript method to change active class