Monday, June 1, 2009

[jQuery] What is the best way to pass variable data from Python to jQuery?

In my code I have some python code that retrieves some data from a db
- and I need to pass some variables from the python code to my jQuery
scripts in order to perform an action. The problem is - what is the
best way to pass this data? So far in the office we've discussed
adding the variable data into the generated HTML via classes or some
other standard HTML attribute or use a custom attribute to store the
data.

What is the best way to accomplish this? Are there other solutions we
haven't considered?

-Sarah

No comments: