updates for jquery 1.9
also added a destory method and testing.