Suppose i have a php script that returns employee details e.g name and address in json encoded format.
i loop through the data returned and print only their names out on a list, not needing to display other data on initial page load.
$.post( "./php/getEmployees.php",function( data ) {
$.each(data, function (index, value) {
$("#list").append('<li><a href="#section2">'+value.title+'</a></li>');
});
},"json");
Now i will have a list of employee names on screen for the user to see. If they were to click on an employee i want to display the rest of their details that was returned in the getEmployees.php script.
How would i store data from my script to be accessed later?