-
Notifications
You must be signed in to change notification settings - Fork 665
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
$.fn is undefined #145
Comments
Hi, Is there an online example? |
Hi Nakupanda, Due to complicated setup with Webpack, I can not post it online. I'm thinking this error cause by jQuery conflict. But beside that I can not think of anything else. |
Ok, So please paste the error details here, let's see if we can find something inside. |
What bootstrap version you're using ? |
Bootstrap v3.3.4 cheers, |
Should we wrap the factory function in the following format see if it will fix the issue? function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
}
}(jQuery); |
If it doesn't take to too much time I would suggest to do so. But can you please also provide what jQuery version you're using, and, did you load it prior to bootstrap? |
jQuery JavaScript Library v2.1.3. |
Strange, can't figure it out at this moment |
The second fix is posted in another issue: in short change I hope this will be useful for other people who have the same problems. cheers |
Hi Nakupanda, Would you commit fix for the errors mentioned above so that I don't need to add the fix each time I update the package? cheers, |
Hi, Changes will be committed today, before that please use your local patch, thank you :) |
👍 |
I'm sorry I was too busy today. Will have it done tomorrow. |
Hi,
I'm currently facing the problem with bootstrap3-dialog using webpack. At runtime, it said
$f.fn is undefined
. $ is defined and I have tested with alert($) but not.fn
. Please note that jQuery and Bootstrap are loaded so libraries dependency is not the cause of this error. Is there anything else that might causes the problem?Cheers,
The text was updated successfully, but these errors were encountered: