I want to set a CSS attribute for a element (div) just for 2 sec. here is my try:
html:
<div class="div">foo</div>
<input class="btn" type="button" value="click" />
jquery:
$(".btn").click(function(e) {
$(".div").css({"border": "1px solid #ccc"});
});
But the above code will be applied for ever, how can I limit it for a specific period ?