$(".className").each(function () { this.style.setProperty('display', 'inline-block', 'important'); } //jQuery answer to avoid creating functions