I am using Knockout.js to populate a set of HTML5 <details> elements. Here is the structure: The data in the ViewModel looks something like this: I have added the ability to remember the open or closed state of the details view using the isOpen property of the ViewModel and an attr binding (As originally described here). However, when I click
Tag: html-tag-summary
binding viewmodel to existence of a property in knockout
I am using Knockout.js to populate a set of HTML5 <details> elements. Here is the structure: The data in the ViewModel looks something like this: I want to add the ability to remember the open or closed state of the details view. I have implemented this behavior previously using jQuery and localStorage1, but for this project I want to use
Automatically close all the other tags after opening a specific tag
Here is my code. What I want to do is — if the details of any single <details> tag is open and I open/view another <details> tag, then the earlier one should close/hide/minimize. How can this be achieved? I’m aware the <details> tag is not supported in IE or Edge. Answer Another approach, slightly shorter, slightly more efficient, without dependencies,