I have an ajax navigation system in my app. Each ajax link is of class ajax and the page it needs to load is saved in an aurl attribute, for example:
<a class="ajax" aurl="/user/posts/3/edit">Edit Post</a>
The aurl is given to the element using symfony's url_for method in the server-side.
I thought about more elegant way of saving the element's aurl attribute, like jQuery.data(), but how can i use it from the server side? creating a script after each element to set it's aurl doesn't seem like a good solution..
Any ideas?