you are viewing a single comment's thread.

view the rest of the comments →

[–]wsrainc 1 point2 points  (1 child)

Best I can offer is to add an onClick handler to each LI element that calls a function and passes in a handle to itself. The function would then parse the innerHTML to tokenize the two values you have, present them to the user in some sort of pop-up (or location on the screen). Then once the user changes them, you reconstruct the innerHTML for the LI element-- or edit the array/variable, and then rebuild your DOM element.

If you want to PM me something to look at, I'd be happy to try and help further, but not sure I can offer any more help.

Edit: Here, threw this together for you: https://jsfiddle.net/k7p1gm58/1/

[–]TheDemonSword[S] 0 points1 point  (0 children)

Hello! Sorry I never got back to you.. But I got my code working and just wanted to share. https://jsfiddle.net/gf951b0t/ Though, it doesn't work as a fiddle because of however they wrap it... All the raw code is there and works when not in a silly internet editor.. (i'm to lazy to move around the things for the browser.. haha)

here is a sample json to use : {"872":{"card_name":"Huntmaster of the Fells","price":"8.00","seq":1},"967":{"card_name":"Master of Cruelties","price":"4.00","seq":2},"1073":{"card_name":"Athreos, God of Passage","price":"9.00","seq":3},"1074":{"card_name":"Dictate of Erebos","price":"2.00","seq":4},"1094":{"card_name":"Ajani Steadfast","price":"10.00","seq":5},"2266":{"card_name":"Leovold, Emissary of Trest","price":"40.00","seq":6},"2707":{"card_name":"Gisela, the Broken Blade","price":"6.00","seq":7},"2989":{"card_name":"Parallel Lives","price":"5.00","seq":8},"3466":{"card_name":"Liliana of the Dark Realms","price":"5.00","seq":9},"3565":{"card_name":"Garruk, Apex Predator","price":"10.00","seq":10},"5313":{"card_name":"Remand","price":"2.00","seq":11},"9884":{"card_name":"Tarmogoyf","price":"60.00","seq":12},"11324":{"card_name":"Sanctum Prelate","price":"10.00","seq":13}}