Make widget independent from jquery