I just discovered that when I run my page in IE 7 - 10, this little function is killing the rest of my javascript file. Any thoughts??

if(window.location.hash) {
    $('#slidestart').stop().animate({ opacity: 0 }, 300, function() { 
        $("#slidestart").css({display:"none"},100);
            setTimeout( function(){
                $("#allbut").css({display:"block",opacity:0},100);
                $('#allbut').stop().animate({ opacity: 1 }, 400, function() { 
                    $('#slidestart').html(' '); 
                });
            },255);
        });
    $('#allbut').stop().animate({ opacity: 1 }, 200, function() { /* animation complete */ });
    $('#htmltag').attr("id","background_add5");
    var hash = window.location.hash.substring(1); 
    //Puts hash in variable, and removes the # character
    var hash_full = "."+hash,     hash_id = $(hash).attr('id');

    $(hash_full).addClass("selected");
        setTimeout( function(){
                $(hash_full).click();
        },190); 
}
Member Avatar for LastMitch

I just discovered that when I run my page in IE 7 - 10, this little function is killing the rest of my javascript file. Any thoughts??

I don't really see anything pop up maybe this line there shouldn't be that much space:

From this:

var hash_full = "."+hash,     hash_id = $(hash).attr('id');

To this:

var hash_full = '.'+hash,hash_id = $(hash).attr('id');

Make all your qoutes single instead double.

From this:

$('#slidestart').stop().animate({ opacity: 0 }, 300, function() {
$("#slidestart").css({display:"none"},100);

to this:

$('#slidestart').stop().animate({ opacity: 0 }, 300, function() {
$('#slidestart').css({display:'none'},100);

Try also to Validate the page and see what error meaning to see CSS is correct on it:

http://validator.w3.org/

Take a look at this chart and compare your CSS to see it's supported or not:

http://www.quirksmode.org/css/selectors/

This is only thing I can think of.

Historically there are no known IE #hash issues.
How do you know thatthis piece of jQuery is killing the rest of your js?
[try moving it toward the end of your scripts]

have you tried jquery community?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.