single line if statement
<p>please help me. I am using a single line javascript if statement, but i want it to execute two actions after it has checked the condition but i do not know how to put the second statement. I thought a semicolon will work, but it doesn't. it says the semicolon is an error.
here is my code, with the semicolons...</p>

<pre><code>this.className === "unclickedButton" ? this.className = "clickedButton";
 $("#alert").style.display="block" : this.className = "unclickedButton"; 
$("#alert").style.display="none"
</code></pre>
