Grabbing Text from elsewhere in the DOM to insert elsewhere
Convoluted title, I know...
Basically, I'm trying to get a three digit number from a <p> in the HTML and insert it into an <input type="text"> elsewhere on the page.
It's for a Paypal "notes" field and I don't want to rely on the user to type their three digit number in the field. I'd prefer to do it with jQuery if possible.
-
<p>501</p>
<input type="text" value="" name="photo_number" id="photo_number" />
That's the basic HTML. Just want the value from the P tag to be automatically inserted into the INPUT tag.
Any ideas? I have no idea where to even start on this one...