I may be missing something here but the following code doesn't work.
As you focus the input to outter div gets toggles a class name.

Please help.

<script>
$(function() {
         $('.fieldRow input').focus(function(){
                $(this).parent('.fieldRow').toggleClass("focused");
         });
});
</script>
<form action="" method="" id="">
        <div class="fieldRow">
                <label for="author">Name:*</label>
                <span class="input">
                        <input type="text" name="author" id="author" value="" 
size="22"
tabindex="1" />
                </span>
        </div>
</form>

Reply via email to