yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

Julius example missing rawJS with newIdent #230

Closed jezen closed 5 years ago

jezen commented 5 years ago

Assuming sectionClass is created with newIdent, and the generated identifier is hident2, a line like this:

$("section.#{sectionClass}").hide();

generates incorrect JavaScript like this:

$("section."hident2"").hide();

The book should be updated to mention we need to use rawJS, like this:

$("section.#{rawJS sectionClass}").hide();

Also worth mentioning that we need the necessary import too.

import           Text.Julius          (RawJS (..))

Page that should be updated is here.