<p id='id'>Text</p>
document.querySelector('#id').style.display='block'
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
config = {
attributes: true,
attributeFilter: ['style']
},
target = document.getElementById('my_id');
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
console.log(mutation.target.style.display);
});
});
observer.observe(target, config);