Closed DaveLindberg closed 9 years ago
@DaveLindberg What line is the error on? Do you get the error on http://iamphill.github.io/Bootstrap-Offcanvas/example.html?
http://iamphill.github.io/Bootstrap-Offcanvas/example.html is coming up clean.
Looks like the error (on my install) is on line 229. JSHint throws warnings on:
line 233
return oc =
"Did you mean to return a conditional instead of an assignment? — column 18"
line 237
return $(this).on('click', function(e) {
"'e' is defined but never used. — column 43"
I installed the components using bower.
@DaveLindberg Hmm.. 229 would be https://github.com/iamphill/Bootstrap-Offcanvas/blob/master/dist/js/bootstrap.offcanvas.js#L229 which would surely mean that $
isn't available. jQuery is available right?
Confirmed, jQuery is loading properly — before the bootstrap.offcanvas.js
@DaveLindberg Could you upload a demo somewhere where it isn't working?
@DaveLindberg Ah I see the issue, angularJS redefines the $
variable. Will get a fix out ASAP.
Fantastic, thanks!
@DaveLindberg Just released 1.3.5 if you could try that.
I've posted the v1.3.5 version to http://webdev.davelindberg.com/ Still getting an error. Line 149?
@DaveLindberg Just checked your demo, and it is still showing the older version?
Just created a PR anyway with a test. Could you try using #10 ?
Thx. Not sure why, but there's a trailing newline on the webdev version that I can't get rid of — don't know why. Other than that, the latest version should be in place.
And yes, this fix does the job nicely on my local server.
@DaveLindberg Cool, will get it merged in.
Styling on your version is off. Looks like you haven't included Bootstrap.
I'm getting the following error when loading my page with
bootstrap.offcanvas.js
installed:Uncaught TypeError: undefined is not a functionbootstrap.offcanvas.js?ver=4.0:229 (anonymous function)bootstrap.offcanvas.js?ver=4.0:253 (anonymous function)
Loading
bootstrap.offcanvas.min.js
produces the same result.