0

My Code (Launch in full window).

My JS Code:

$(document).ready(function () {
    $("#play_buttton").hover(
        function () {
            $('#play_button').css({ "height": "240px", "width": "250px" });
        },
        function () {
            $('#play_button').css({ "height": "225px", "width": "220px" });
        }
    );
});

I think that this code must be creating the problem.

Problem: When , I hover over the image (#play_button) , nothing happens and its height and width don't change.Can anyone tell me how do I fix that.

Thanks.

0

2 Answers 2

7

It will be play_button not play_buttton

$(document).ready(function () {
    $("#play_button").hover(   // Here not play_buttton
        function () {
            $(this).css({ "height": "240px", "width": "250px" });
        },
        function () {
            $(this).css({ "height": "225px", "width": "220px" });
        }
    );
});

See this sample FIDDLE.

You can also .animate it like in this FIDDLE2

Sign up to request clarification or add additional context in comments.

2 Comments

Working suddenly, Thanks ,but where's the difference !
"You can also .animate" Nice new method !
1

Wrong spell at $("#play_butt*t*on").hover

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.