How to run most basic example?
Closed this issue · 3 comments
Hi, I tried to get a very basic example running. I managed to get it running in fay ide, but not outside of it.
main =
ready $
select "body" >>= \body ->
setHtml "abc" body >>= \jq ->
return ()
When I run this in the fay ide, the abc string is displayed.
But when I compile this and attach in some html file, the page is as the code wasn't run.
Also, when I compile the example provided in this fay-jquery project, test.hs that is, I just see the page with Replace this string. That doesn't seem to be as intended. I can see that the code is referenced with script tag, so the plumbing isn't the source of the issue.
Any help is appreciated!
The test works for me, I compile with
fay --package fay-jquery test.hs
For your example: Do you get any errors in the javascript console? Did you include jquery in the html file?
Yes, I forgot to include jquery. That was stupid. Thanks
happy to help!