Reputation: 55
I have a jQuery accordion that by default on page load has all items collapsed. It allows a user to click on an item to open for content and click on the same item to collapse it. A user may also click on another item to open that content and close the previous item. The usual.
What I want to be able to do is when I close the open item by clicking on it, make it inactive like when the page loads. When I click on the item, the content closes but the item is still active and the CSS for the open item is visible. How do I make it inactive on close so that it goes to default state?
Upvotes: 2
Views: 558
Reputation: 5217
Without code it's impossible to help. Post some excerpts at least.What kind of "jquery accordion" are you using? Most likely the accordion has some css that makes an item appear "active"; you could check for clicks on an item (ie it is being closed, but not because some other item opens, but because the items is "minimized") and then revoke the css that makes it appear active.
Upvotes: 0