N
N
nikegk2014-07-21 08:56:36
JavaScript
nikegk, 2014-07-21 08:56:36

How to move input without losing focus from it?

Hello! Please help me find a solution.
I have a page that has an input field . The task is this: when the user starts typing something in the input field, it moves to another place on the page (in this case, to a table cell). This is done with the following script:

$(document).ready(function () {
    $(".search_box").bind("keyup input", function () { 
        $('.td').append( $('.center>.search') );
        $('.search_box').focus();
        $(".center").remove();
        $(".content").css("display", "block");
    });
});

It works fine on all browsers except IE8-IE11 (didn't try it on earlier ones). It loses focus after moving the input.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Optimus, 2014-07-21
Pyan @marrk2

IE version tell me which one you are testing

G
GM2mars, 2014-07-21
@GM2mars

Have you tried putting the focus back into the input after moving?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question