Howdy all. Can't seem to get my mind wrapped around this one. I have a webpage built with Bootstrap CSS (so lots of nested DIVs). What I'm trying to do is to show the user some information that is provided by the database, and to allow them to one-click copy that information into an adjacent field. I'm thinking this should be easy, however no matter how I build the selector, I can't get it to copy the information into the field. It's too complicated to put here, so I've built a fiddle to illustrate the wall I'm hitting.
In the example, I want the "12" to be populated into Field 1 when the user clicks the arrow button. Presumably, this could happen all the way down the page on every input field one-by-one if the user chose.
Also worth mentioning that the database assigns a unique ID to each input group, so the example ID won't work.