Using class and doing it for jQuery, rotating also starts to work