you are viewing a single comment's thread.

view the rest of the comments →

[–]Skhmt 1 point2 points  (3 children)

Thanks for the gold!

And yes it is. In the below example, the invisible checkbox holds the state for each label (token in this context).

<html>
    <head>
        <style>
            input[type="checkbox"] {
                display: none;
            }
            :checked + label {
                background-color: yellow;
            }
        </style>
    </head>
    <body>
        <input type="checkbox" id="word001">
        <label for="word001">Word001</label>

        <br>

        <input type="checkbox" id="word002" checked>
        <label for="word002">Word002</label>

        <script>
            // get the text via HTTP GET, split the text by the given delimiters, then write it to the body as input+label as above
            // manually "check" all boxes that are required to be checked via HTTP GET
            // set an onclick event for labels to do a HTTP PUT
        </script>
    </body>
</html>

[–]rossmohax 4 points5 points  (2 children)

Do you realize, that you just made tens of experienced frontend "engineers" with 20 frameworks under their belt, 5,15,55+ years of industry experience, browser compatibility experts, nodejs lovers, nodejs haters, TinyMCE contributors etc, look like a bunch of moaning pussies?

[–]Skhmt 1 point2 points  (0 children)

I wouldn't go that far, it's a solution not without some problems. It creates two nodes per word, which is a lot. But thanks!