article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block;}
$(document).ready(function() { $('article').click(function(e) { e.stopPropagation(); var offset = $(this).offset().top - 70; $('body').animate({scrollTop: offset}, 'slow'); });});
<div id="wrap" class="clearfix">
$(document).ready(function() { $('article').click(function(e) { var offset = $(this).offset().top - 70; $('body').animate({scrollTop: offset}, 'slow'); e.stopPropagation(); });});
$('article').click(function(e) { var offset = $(this).offset().top - 70; $('html, body').animate({scrollTop: offset}, 'slow'); e.stopPropagation();});
I'm also using a css reset that has
Anybody else have this problem?
ANYWAY,
that said,
This code works in Chrome, not Firefox or IE:
Maybe I'm missing something really obvious, but don't think so.
Regretting using HTML5 right now :D
Try this:
Unfortunately, moving stopPropogation() didn't handle it, nor does removing it altogether.
Is this the most practical way of doing this?
Here's a live example: http://websitesthatmarket.com/dblog/site/
No, that photo isn't of me.
Click anywhere in any article and you'll see what it's doing. Only works in Chrome.
Thanks!!!!!!!!!!
Note: $('html, body')
Thanks!!!