fix sample to work without jquery