Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other IE not recognizing header tag

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32126
    soap
    Participant

    I’m having an issue where IE 8 (haven’t tested on any others) isn’t recognizing the header tag. I’m using the html5 shiv. It’s not showing up at all..

    I’m also using a css reset that has

    article, aside, details, figcaption, figure,
    footer, header, hgroup, menu, nav, section {
    display: block;
    }

    Anybody else have this problem?

    #53800
    jamygolden
    Member

    Have you validated your html?

    #53802
    soap
    Participant

    hahahahahaaha…….. i was inlcuding the header before body…

    ANYWAY,

    that said,

    This code works in Chrome, not Firefox or IE:

    $(document).ready(function() {
    $('article').click(function(e) {
    e.stopPropagation();
    var offset = $(this).offset().top - 70;
    $('body').animate({scrollTop: offset}, 'slow');
    });
    });

    Maybe I’m missing something really obvious, but don’t think so.

    Regretting using HTML5 right now :D

    #53888
    jamygolden
    Member

    You’re forgetting to close

    Try this:

    $(document).ready(function() {
    $('article').click(function(e) {
    var offset = $(this).offset().top - 70;
    $('body').animate({scrollTop: offset}, 'slow');
    e.stopPropagation();
    });
    });
    #53871
    soap
    Participant

    Yeah sorry the bottom of the code didn’t get pasted.

    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!!!!!!!!!!

    #53823
    jamygolden
    Member

    Got it.

    $('article').click(function(e) {
    var offset = $(this).offset().top - 70;
    $('html, body').animate({scrollTop: offset}, 'slow');
    e.stopPropagation();
    });

    Note: $(‘html, body’)

    #53824
    soap
    Participant

    Ahhhhh you’re beautiful, that did the trick :)

    Thanks!!!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.