This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-15
Channels
- # announcements (2)
- # aws (3)
- # babashka (2)
- # beginners (100)
- # calva (3)
- # chlorine-clover (22)
- # cider (7)
- # clj-kondo (1)
- # clojure (240)
- # clojure-france (6)
- # clojure-hungary (2)
- # clojure-spec (7)
- # clojure-sweden (3)
- # clojure-uk (19)
- # clojurescript (21)
- # core-typed (8)
- # cryogen (2)
- # cursive (8)
- # data-science (7)
- # datomic (7)
- # duct (7)
- # fulcro (13)
- # keechma (1)
- # luminus (3)
- # malli (3)
- # off-topic (258)
- # pathom (5)
- # reagent (4)
- # shadow-cljs (111)
- # sql (4)
- # tools-deps (12)
- # vim (1)
- # vrac (1)
- # vscode (35)
$(document).ready(function() {
// Check for click events on the navbar burger icon
$(".navbar-burger").click(function() {
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
$(".navbar-burger").toggleClass("is-active");
$(".navbar-menu").toggleClass("is-active");
});
});
So I have the above code in jquery. Is there any cljs equivalent library or should I stick with jquery?
for that code in particular, if there’s nothing else, I guess cljs doesn’t really help you out
new to cljs dev. I am thinking what’s the most common way to achieve that specific problem in the cljs setting.
So I found, 1. goog library. 2. cljs js interop. 3. reagent/reframe stuff. Either is fine. I might go with 2 for this problem.
there’s a library that might help - https://github.com/appliedsciencestudio/js-interop
but, if you’d like to just try the syntax first, doing some simple dom stuff sounds like a good way to go
If so, just change its definition. If not, you can still change its on-click
event handler, I think.
I want to publish a library with both Clojure and ClojureScript files. I'd like to include the ClojureScript as dev dependencies while using the Clojure files as normal dependencies. Is there a cleaner way to do this other than creating two libraries and having users set up their deps.edn/project.clj appropriately, or is that the best practice?