S
S
Stas2015-11-14 13:30:11
JavaScript
Stas, 2015-11-14 13:30:11

Why animation works crookedly?

For some reason, when I click on the search, the leaving input appears abruptly,
ebf18db14e9d418ab7b84031b1010a08.jpg
and then everything leaves normally. And the same at closing.
c8d5203cd5b54efdb3b50282d8ddc22a.jpg

$(document).ready(function() {
    $("#searc_icon").click(function() {
        $("#search_get").animate({width: "toggle"}, 2000);
    });
});

css input
#search_get {
    float: right;
    display: none;
    outline: 0;
    border: 0;
    width: 251px;
    height: 66px;
    position: relative;
    background: #6DC715;
    color: #FFF;
    font-family: RobotoLight;
    font-size: 20px;
    padding-left: 25px;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stas, 2015-11-14
@Donalds

=) Figured it out, put input into a div

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question