Adding data to element so jQuery can use it
<p>I'm looking for an elegant way to add data to an element on server side so that jQuery/JavaScript can use it. I also do not want to make too many calls to server so data must be there upfront.</p>

<p>Scenario example.
Server side (PHP), I create a list of user images. To this, I want to add name, surname, age, etc.<br /> 
When clicking on the images, jQuery must then do something with this data.</p>

<p>Possibilities I've considered:<br />
Have the data as href, then on click, get the href and return false.<br />
Have the data as classes. </p>

<p>Are there any better ways?</p>
