Converting element to basejs class