Update common-functions.js

finished the add/remove/has/toggle class functions