I am using jquery to write true and false strings to data- html attributes. However when I write false to one of the attributes, and then check it it false, it returns true. I a
The simplest fix would be:
var is_activate = $(this).attr("data-is-panel-activated") !== "false";
or
var is_activate = $(this).attr("data-is-panel-activated") === "true";
depending on which semantics makes more sense for your code.