[web-devel] Happstack external js

Michael Snoyman michael at snoyman.com
Tue Jun 28 06:20:37 CEST 2011

On Tue, Jun 28, 2011 at 5:12 AM, Mister Asafe Ribeiro
<asafe.hai.kai at gmail.com> wrote:
> How do i include a external js file, such as jquery, using blaze html in
> Happstack?

Speaking from the blaze-html side, you would use the script and src
combinators. So if you wanted to use Google-hosted jQuery, you could

    import qualified Text.Blaze.Html5 as H
    import qualified Text.Blaze.Html5.Attributes as A
    H.script ! A.src
"https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" $
return ()


More information about the web-devel mailing list