change border/color onFocus
<p>I tried to make script which changes color of border-bottom of div after having focus on </p>

<pre><code>&lt;input type="text"&gt;
</code></pre>

<p>and then changing back to default color after clicking somewhere else.</p>

<p>This is what i tried:</p>

<p>Css:</p>

<pre><code>.div1 {border-bottom:1px solid #ccc;}
</code></pre>

<p>Javacript: </p>

<pre><code>function inputFocus(){ $(".div1").css("border-bottom","1px solid #ffba00"); };
</code></pre>

<p>Html: </p>

<pre><code>&lt;input type="text" onFocus="inputFocus();"&gt;
</code></pre>

<p>The first part (changing color on focus) works fine, however after clicking somewhere else (not having focus on input) it doesnt change back to normal style as set in css file.</p>

<p>any idea what im doing wrong?</p>
