[web-devel] using YesodJquery with other jquery plugins
mxcantor at gmail.com
Fri Dec 24 02:51:01 CET 2010
I've been trying to use jquery's ui-layout plugin in a yesod project. Unfortunately, the YesodJquery typeclass sticks the jquery script calls at the bottom of the header, so when I toss in addScriptRemote "<url for ui-layout>" it gets inserted above the jquery scripts which breaks it.
I've temporarily solved the problem by adding a %script!src="<url for ui-layout>" to the body of my hamlet file but this is pretty poor form and ideally wouldn't be necessary.
Is there a better way?
If not, perhaps making an adding a function to the YesodJquery typeclass:
urlJqueryPluginsJs :: a -> [Either (Route a) String]
in which one could add in plugin files that would be guaranteed to load in that order, after the jquery and jquery-ui files are loaded, would be a viable solution.
More information about the web-devel