Skip to content
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

Enquire.js (on Shopify Debut Theme) Breaks Bootstrap Modal function #171

Open
qrcf opened this issue Mar 8, 2018 · 1 comment
Open

Enquire.js (on Shopify Debut Theme) Breaks Bootstrap Modal function #171

qrcf opened this issue Mar 8, 2018 · 1 comment

Comments

@qrcf
Copy link

qrcf commented Mar 8, 2018

Weirdest issue ever.

I have a bootstrap modal on the page. I can't trigger it to .modal('toggle') if I use external javascript. If it 's inline javascript it works fine.

If its external javascript, I get an error from enquire.js.
"TypeError: $('#slotcap-modal').modal is not a function. (In '$('#slotcap-modal').modal()', '$('#slotcap-modal').modal' is undefined)". This is line 1742 or
" s[l].apply(n[0], n[1]) === !1 && e.stopOnFalse && (l = s.length, n = !1); "
in re callbacks.

Before you ask, jquery is imported before bootstrap.
Yes the id is correct.
If I remove vendor.js it functions as expected; of course at the sacrifice of the site. Since I'm developing a shopify application id prefer to avoid an issue on the debut theme!

@smartconvos
Copy link

I'm sure this is no longer helpful for your case, but at any rate I had this same issue. I couldn't use "modal.Open" which all signs pointed to as a multiple jQuery issue. Sure enough, inside vendor.js are 3 lines which manually include a minified version of jQuery. I don't believe these are needed (at least I haven't seen any issues thus far) so removing them seems to do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants