Please use the Question Tags to start the name and full version number of the story format you are using, it makes it easier to find that information within a question as well as helps when searching for questions related to that story format.
If you look the StoryRightSidebar passage of the original example you will see that the outer div element has been assigned a health-bar CSS class.
<div class="health-bar">\
<div class="bar">\
<div class="hit"></div>\
</div>\
</div>\
... and if you look at the 2nd line of the original Story Javascript area code you will see that it also references the same health-bar CSS class.
(note the full stop at the start of the class name.)
postrender["Update Health Bar"] = function (content, taskName) {
var hBar = $('#right-ui-bar-body .health-bar'),
...
... and if you look at this comment by TheMadExile in that same question you will learn that the CSS (within the Story Stylesheet area) should also be targeting the same health-bar CSS class.
(note the full stop at the start of the class name.)
.health-bar {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
....
You have changed the CSS class of the outer div to sanity-bar in your StoryRightSidebar passage example
<div class="sanity-bar">\
<div class="bar">\
<div class="hit"></div>\
</div>\
</div>\
... this means that you will also need to change the health-bar CSS class in both the Story Javascript area code and the Story Stylesheet area styling to also be sanity-bar (with a leading full stop)
eg. changed Story Javascript.
postrender["Update Health Bar"] = function (content, taskName) {
var hBar = $('#right-ui-bar-body .sanity-bar'),
...
eg. changed Story Stylesheet.
.sanity-bar {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
....
WARNING: The implementation of the original Health Bar example assumed that there would only be a single bar within the StoryRightSidebar passage.
If you are planning on having multiple bars within that passage then you will need to change how those bars are defined and identified, then change both the JavaScript code and the CSS styling to use that identification instead of the current CSS class based implementations.