Brett on 15 Aug, 2016 09:29 PM
Then there's probably a conflict with the built-in scripts that isn't
throwing an error. This isn't intended Marked functionality, so I can't
offer a lot of support with debugging. I will say, though, that as I
mentioned before jQuery is already loaded in the preview and loading it
twice can cause unexpected results.
Loading it is necessary though. Otherwise I get an error. Perhaps Marked is putting the script in an odd spot where it can’t see jQuery (and perhaps can’t see the document’s HTML, which might explain nothing happening)?
Brett on 16 Aug, 2016 04:09 PM
Ok, you seem to be correct about the internal jQuery not being loaded in
time to handle the script within the document body. However, if I run
your script above I do get classes added to each item. Have you looked
in the inspector to ensure you're not seeing the proper results (just
right click a list item and Inspect)?
In how it’s rendered in Marked 2. If I have that CSS in my custom stylesheet. And I have the code to add the classes in my Markdown. None of the elements that should have the classes attached by the code (a) seem to have it attached when viewed; nor (b) render as if they do.