Reputation: 4643
I want to make new CSS rules on the client, for doing CSS transitions for example. Apparently jQuery has this kind of thing, but what about in the world of Clojurescript ?
I found Gaka and Garden for generating CSS on the server side like Hiccup, but what if I want to do dynamic CSS on the client side ?
Does Enlive, Dommy or any of those Clojurescript libs do that ?
Upvotes: 2
Views: 834
Reputation: 333
Garden works on the client side with ClojureScript. It does virtually everything the "server side" Clojure version does with a few minor exceptions. You can use it to generate or update stylesheets in the browser if that's what you're looking for.
Upvotes: 2
Reputation: 22549
Take a look at jayq
You can do CSS manipulation to a DOM element via simple built in css wrapper and a Clojure map:
(ns myapp
(:use [jayq.core :only [$ css inner]]))
(def $interface ($ :#interface))
(-> $interface
(css {:background "blue"})
(inner "Loading!"))
Upvotes: 4