You call .modal on the div, but AFAIK when using jquery, $(..) does more
than just retrieve the DOM node - it adds all the jquery methods too.
You could try calling (.modal (js/$ modal) "show") or you could look into
using https://github.com/ibdknox/jayq

In any case, mixing jquery (and similar) with React/Om doesn't seem to be a
great idea if you can at all help it. My suggestion would be as Thomas says
and write a modal Om component instead. Another alternative (probably what
I will do soon) is to look into using the modals from
https://github.com/luxbock/bootstrap-cljs

On 6 August 2014 14:54, Makoto H. <[email protected]> wrote:

> I have defined bootstrap.js like
> ":externs ["/bootstrap.js"]" in my project.clj.
>
> But I'm not sure that is correct or not.
>
> https://gist.github.com/tokomakoma123/d2111e9ee288e3dddbcf
>
> I found an article in the web which provides a solution how to use
> bootstrap components from react.js.
>
>
> http://clozeit.wordpress.com/2014/01/08/bootstrap-modals-and-popover-in-react-js/
>
> I will try to rewrite it into om.
>
> Thanks,
> Makoto
> > Looking at the code it seems like you are calling jquery style code
> without actual jquery.
> >
> > (.modal modal "show")
> >
> > .modal is a method provided via bootstrap.js/jquery and usually called as
> >
> > $('#div-modal').modal('show')
> >
> > I'm not sure on how you'd interface bootstrap with Om but I doubt that
> there is a "sane" way. You are probably better off writing a modal
> component in Om.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to