clojurescript-javascript-interop

How to hide/show a table in ClojureScript

本小妞迷上赌 提交于 2020-03-23 14:14:02
问题 I would like to show/hide a table when a font-awesome chevron button is clicked. The following code comes from http://jsfiddle.net/z0y0hp8o/6/. I would like to do the same thing, but in clojurescript using java interop. (document).on('click', '.panel-heading span.clickable', function(e){ var $this = $(this); if(!$this.hasClass('panel-collapsed')) { $this.parents('.panel').find('.specialCollapse').slideUp(); $this.addClass('panel-collapsed'); $this.find('i').removeClass('glyphicon-chevron-up')

How to hide/show a table in ClojureScript

纵然是瞬间 提交于 2020-03-23 14:12:18
问题 I would like to show/hide a table when a font-awesome chevron button is clicked. The following code comes from http://jsfiddle.net/z0y0hp8o/6/. I would like to do the same thing, but in clojurescript using java interop. (document).on('click', '.panel-heading span.clickable', function(e){ var $this = $(this); if(!$this.hasClass('panel-collapsed')) { $this.parents('.panel').find('.specialCollapse').slideUp(); $this.addClass('panel-collapsed'); $this.find('i').removeClass('glyphicon-chevron-up')

Clojurescript date timepicker with cljsjs/react-day-picker

送分小仙女□ 提交于 2020-01-25 07:05:30
问题 I am new to clojure and clojurescript . I just to know how I can implement this library in clojurescript . This is the link to the library: https://react-day-picker.js.org/examples/basic I have required the library in my name space like so : (ns woot (:require [cljsjs.react-day-picker])) But I do not know how to proceed from here And when I try (js/react-day-picker) I get this error #object[ReferenceError ReferenceError: react_day_picker is not defined] (<NO_SOURCE_FILE>) 回答1: CLJSJS works by

How to author agnostic JavaScript library in ClojureScript?

依然范特西╮ 提交于 2019-12-21 04:57:30
问题 Let's say I have a cljs file containing the following: (ns foo) (defn add [x y] (+ x y)) and wish to make this available as a JavaScript library to non-ClojureScript devs (primarily focused on node.js). I can do this: clj -m cljs.main -c foo But the problem is that the output is geared towards google closure's module system (e.g. goog.require ). I can set the target to none with the -t flag (as opposed to browser or node), and that... doesn't fix this. Setting it to node also doesn't fix the

How to author agnostic JavaScript library in ClojureScript?

為{幸葍}努か 提交于 2019-12-03 15:44:23
Let's say I have a cljs file containing the following: (ns foo) (defn add [x y] (+ x y)) and wish to make this available as a JavaScript library to non-ClojureScript devs (primarily focused on node.js). I can do this: clj -m cljs.main -c foo But the problem is that the output is geared towards google closure's module system (e.g. goog.require ). I can set the target to none with the -t flag (as opposed to browser or node), and that... doesn't fix this. Setting it to node also doesn't fix the issue: no index.js (it's called main like in Java), no module.exports = blah blah . Seems like it's