jQuery: Can't select all inputs and on keydown select 'this' and show next element

colman98

New Member
I'm attempting to use jquery to select all inputs in the HTML document below and on the 'keydown' event select 'this' and then show the next element.My jQuery\[code\]$(document).ready(function(){ $('.hint').hide();}); $('input').keydown(function(){ $(this).show();});\[/code\]My HTML\[code\]<!DOCTYPE html><html><head><title>Title of my Page</title></head><body><p> <input type="text"><span class="hint">Something cool</span></p><script type="text/javascript" src="http://stackoverflow.com/questions/14062332/jquery.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/14062332/app.js"></script></body></html>\[/code\]
 
Back
Top