Created
April 17, 2012 00:29
-
-
Save wilornel/2402534 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| $(document).ready(function(){ | |
| $('body').keypress(function(){ | |
| event.preventDefault(); | |
| $('#input').focus(); | |
| }); | |
| $('#input').keypress(function(){ | |
| event.stopPropagation(); | |
| }); | |
| $('#input').keyup(function(){ | |
| if(event.keyCode == 13){ | |
| $('#search').click(); | |
| }; | |
| }); | |
| $('#search').click(function(){ | |
| // Here // Alert the value of the input | |
| var query = $('#input').val(); | |
| alert(query); | |
| }); | |
| $('.item').hover(function(){ | |
| $(this).addClass('hovered'); | |
| },function() | |
| $(this).removeClass('hovered'); | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment