0

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); 
}

Edited by turpentyne

3
Contributors
2
Replies
21
Views
4 Years
Discussion Span
Last Post by Troy III
0

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.

0

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.