passing particular json data to another page
In my project, I have a JSON
file. I display the data that is parsed inside a list (ul)
under a div with the class,
"inner", and show only the name and cost of each product that you can see in my JSON
When I click on the first product (first list item), I want to show the detail (value detail) of this product in another page from that same JSON
object; when I click on the second product, I want that to show in a different page too, but also from that same object.
- <html>
- <head>
- <title>jquery</title>
- </head>
- <body>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
- <script type="text/javascript">
- $.ajax({
- url: 'http://sonsofthunderstudio.in/jj/product.json',
- dataType: 'jsonp',
- jsonpCallback: 'jsonCallback',
- type: 'get',
- crossDomain : true,
- cache: false,
- success: function(data) {
- $(data.product).each(function(index, value) {
- console.log(value);
- $( ".inner" ).append("<li>"+value.name+"<img src='" + value.image + "' width='50px' height='50px' / >"+value.cost+"</li>");
- });
- }
- });
- </script>
- <div class="inner">
- </div>
- </body>
- </html>
Where can i go from here?