spine / spine-rails

Spine plugin for Rails
171 stars 38 forks source link

Add and remove active class for div in spine #21

Closed VinothiniBalakrishnan closed 12 years ago

VinothiniBalakrishnan commented 12 years ago

I want to know in spine how to add and remove active class for div. In the firebug I saw initially 4 div inside, the first div having class as active when i click new link the div class active was removed for the first div at the same time the second div getting the class active. Why i am asking means. I generate an app. That app containing has many and belongs to relation ships. In localhost:3000/#/post I can see all the posts. When i click show link for individual post that showing the post detail in localhost:3000/#/post/1 If i click a comment link in this page one form will open at the bottom of the page. If i give the comments and save i can see all the comments for this post. Instead of giving comments in if i click back button page will go to the post list page but at the bottom of the post list page the form was opened because the div class of the form was changed in to "active". So how can i remove the class active.