Closed adamfairhead closed 11 years ago
I had/have the same issue (https://github.com/zurb/foundation/issues/641). I wound up just writing my own jquery but if you do find a solution, please post it.
I'm experiencing the same issue with off canvas. Clean download, added in some hyperlinks and they don't go anywhere. Hopefully this gets fixed as I want to use it for one of my current projects.
I can confirm I have the same issue! (Also with the example pages you provide in the download).
e.preventDefault(); in the following code from jquery.offcanvas.js is preventing the links from working.
$('#nav li a').on(events, function(e) {
e.preventDefault();
var href = $(this).attr('href'),
$target = $(href);
$('html, body').animate({scrollTop : $target.offset().top}, 300);
});
Typically that's to prevent an id from being added to the end of the url in a case like < a href="#id">
Since I am using ajax to replace the "main content", as a temporary solution, I've commented out the above code @awshout mentioned, and run ...
$('body').removeClass('active-menu');
... after the ajax call returns successfully.
Removed that preventDefault, it didn't seem as if it was even really needed for things to work properly.
I'm experiencing a error that logs whenever I attempt to click any of the links once revealed in the off canvas 2 example. That error is:
TypeError: 'null' is not an object (evaluating '$target.offset($.top')
This error is preventing me from following any of the links. Any ideas why this might be?