best way to store php data on a page for use with javascript/jquery?
- by Haroldo
Ok, so im trying to work out the fastest way of storing data on my page without slowing the page load:
I need to store information in the
page to be later used by jquery.
My page is an events page and i want to
attach data to each event anchor.
there are 100+ events to attach data to.
The events anchors are created with a php loop,
so i could create the data elements within this loop using either
use un-semantic tags ie *rel="some_data"*
create a jquery.data() for each iteration of the loop
or i could run the loop again, separately, this time inside script tags with jquery.data();
would really appreciate any thoughts on this!