0

I have added jquery js file to a web page in .NET 1.1 web app.

And added this script

<script type="text/javascript">
    $(function() {

        $("input").blur(function() {
            $(this).attr("background-color", "#000000");
        });
    });
</script>

But when I tab off a textbox nothing happens.

This should work right in 1.1??

Malcolm

1 Answer 1

2

You need to use css not attr:

 $(this).css("background-color", "#000000");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.