As your code is unclear it looks like problem with selector you are using for "div" elements. You have to use proper selector and make sure that element is exist. Otherwise
.css("background-color":"red")
will apply to all "div" inside "#step_wrapper" or to nothing.
Add more detail to your code.