Focus on first form element inside span when span is clicked

devila

New Member
I can't figure out how to focus on the first form element inside a span when the span is clicked. I've included my code, I had also messed around with 'closest' but had no luck.\[code\]<form><span> <input id="content" type="text"> <label for="content">Content</label></span></form>$('span').click(function() { $(this).find('input').focus()});\[/code\]Any help is appreciated.
 
Back
Top