-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jQuery bindings behaviour differs from raw Kotlin/JS eval() #166
Comments
I think you have two jQuery instances in your project, because So first you need to make sure there is only one jQuery module. I could help if you prepare an example project. And also remove |
You absolutely right, I had two jQuery instances =) commented out all kvision-bootstrap modules from gradle. Here's example project: https://github.com/kam1sh/kvision-sandbox/tree/fomanticui So, it's not possible to use KVision jQuery bindings if I use jQuery included in page explicitly? I mean, if I have <script src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script type="text/javascript" src="main.bundle.js"></script>
<script src="semantic.min.js"></script>
<link rel="stylesheet" type="text/css" href="semantic.min.css">
<link rel="stylesheet" href="main.css"> |
It's never a good idea to have two jQuery instances. You have to use the one provided with KVision. You should be able to add support for |
Or there is also a simpler solution that seems to work - just add this line at the beginning of you
|
Solved it! I only had to add this in config.externals = {
jquery: 'jQuery'
} Now both KVision and Semantic/Fomantic-UI recognizes jQuery from |
Hi! Sorry to bother you on the weekend.
Today, working on integrating Semantic/Fomantic UI in my application, I've encountered situation when code from
eval()
works, but the same code with KVision jQuery bindings don't.See following example:
This works as charm. I tried to rewrite it to KVision jQuery:
When this code executes, I got this error:
Is this a bug? Or I don't understand something?
I can provide later repo with minimal example if you want.
The text was updated successfully, but these errors were encountered: