Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
153
rated 0 times [  154] [ 1]  / answers: 1 / hits: 79348  / 12 Years ago, sun, april 15, 2012, 12:00:00

I have a series of input elements each with a few <div> tags separate.

I like to have if where I can click on any of the <div> and it will focus on an input.

Is this possible and if so can anyone give ideas on script?


More From » jquery

 Answers
2

Try this with jquery:



$('#yourdiv').click(function() {
$('#yourfield').focus();
});

[#86228] Friday, April 13, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cullenmaxl

Total Points: 414
Total Questions: 112
Total Answers: 87

Location: United States Minor Outlying Island
Member since Sat, May 28, 2022
2 Years ago
;