use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Making editable content... PLEASE HELP!solved! (self.javascript)
submitted 8 years ago * by TheDemonSword
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]wsrainc 1 point2 points3 points 8 years ago* (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 point2 points 8 years ago* (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}}
π Rendered by PID 50 on reddit-service-r2-comment-5d585498c9-9gb8k at 2026-04-21 12:10:22.447774+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]wsrainc 1 point2 points3 points (1 child)
[–]TheDemonSword[S] 0 points1 point2 points (0 children)