Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
    <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
    <meta charset="utf-8">
    <title>IE Button Focus Issue</title>
</head>
<body>
    <input type="text" value="T1" id='t1' />
    <input type="text" value="T2" id='t2' />
    <br />
    <input type="button" id="b1" value="Button1" />
    <button id='b2'>
        <div>Button2</div>
    </button>
    <script>
        $(function () {
            $('#b1').click(function () { 
              alert("Button1 Clicked!"); 
            });
            $('#b2').click(function () { 
              alert("Button2 Clicked!"); 
            });
            $('#t2').focus().select();
        });
    </script>
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
darkthreadpro
0viewers