I have tried both the approaches:
Through Ribbon workbench, applied display rules as well as enable rule when status is available, button should be visible else not.
In JavaScript, on click of another button, the available button should be visible otherwise , for that I added this line:
parent.document.querySelector('[data-id=/hoabl.ApplicationRibbon.Button11.Button/]').style.display = /none/;
this works fine when testing in console but not in code.
Any Suggestions?