Hello,
I write the following javascript codes.
<script>
$(document).ready(function(){
$("input").focus(function(){
$(this).css("background-color","#fbecc5");
});
$("input").blur(function(){
$(this).css("background-color","#f5f5f5");
});
$("textarea").focus(function(){
$(this).css("background-color","#fbecc5");
});
$("textarea").blur(function(){
$(this).css("background-color","#f5f5f5");
});
});
</script>
Only to put the effect on <div id="carticle3">, not on other input form, such as the navigation search input box. How to write the javascript code so that it's only affecting the targeted input box ?
<div id="carticle3">
<div id="title">Your Message: </div><br><br>
<input type="text" name="name" placeholder="Your name" value=""><br>
<input type="text" name="email" placeholder="Your email" value=""><br>
<input type="text" name="subject" placeholder="subject" value=""><br>
<textarea rows="4" cols="20" placeholder="Message">