I have jquery grabbing an id from something else (image) and I would like to append that id into an input hidden field
var imageID = $('#slides li').find('img').attr("id");
This gives me the id, and I know that if I do something like this :
$("#pic-title").html(imageID);
It will append to <div id="pic-title">(this is where the imageID value will be)</div>
.
But what if I want to put into an attribute within a tag?
<div id="(imageID value will be placed here instead)"></div>
I hope this is clear enough. Thank you!