Did you get this worked out? Appears the alert's gone from your script, so it's a little hard to tell what's going on.
No I took the alert out as I was working on it. There is a missing semicolon on line 37 (fixed and now on line 38), but that wasn't the issue. I also updated it a little bit (added line 3 to ignore right clicking on the links). Let me re-post the code and re-add the alert. Also, let me know if you need any other alerts added! Someone needs to come out with a Firebug for IE6
If you could help me nail this down it'd be great. I can handle IE CSS issues... but IE specific JS issues are so hard to figure out, especially when dealing with a complex framework like jQuery.
// AJAX Page Changing
$("#mContainer a:lt(6),#home a").live("click", function(event){
if(event.button != 0){return true;} // wasn't the left button - ignore
var clickID = 0;
var hrefID = $(this).attr("href");
alert(hrefID);
switch(hrefID){
case 'home':
clickID = 0;
break;
case 'portfolio':
clickID = 1;
break;
case 'resume':
clickID = 2;
break;
case 'about':
clickID = 3;
break;
case 'contact':
clickID = 4;
break;
case 'tutorials':
clickID = 5;
break;
}
$.ajax({
type: 'POST',
url: "/includes/pages/"+hrefID+".php",
data: "ajaxtab=1",
cache: false,
success: function(code){
// Change Tab Image
var expireDate = new Date(new Date().getTime()+86400000*5); //5 Days
document.cookie = "soluml="+hrefID+";expires="+expireDate.toGMTString();
$("#body").fadeOut("fast", function(){$("#body").html(code);});
$("#body").fadeIn("fast");
$.post("/includes/topnav.php",{ajaxtab:clickID},function(data){$("#mContainer").html(data);});
},
error: function(){
return true;
}
});
return false;
});
//
- // AJAX Page Changing
- $("#mContainer a:lt(6),#home a").live("click", function(event){
- if(event.button != 0){return true;} // wasn't the left button - ignore
- var clickID = 0;
- var hrefID = $(this).attr("href");
- alert(hrefID);
- switch(hrefID){
- case 'home':
- clickID = 0;
- break;
- case 'portfolio':
- clickID = 1;
- break;
- case 'resume':
- clickID = 2;
- break;
- case 'about':
- clickID = 3;
- break;
- case 'contact':
- clickID = 4;
- break;
- case 'tutorials':
- clickID = 5;
- break;
- }
- $.ajax({
- type: 'POST',
- url: "/includes/pages/"+hrefID+".php",
- data: "ajaxtab=1",
- cache: false,
- success: function(code){
- // Change Tab Image
- var expireDate = new Date(new Date().getTime()+86400000*5); //5 Days
- document.cookie = "soluml="+hrefID+";expires="+expireDate.toGMTString();
- $("#body").fadeOut("fast", function(){$("#body").html(code);});
- $("#body").fadeIn("fast");
- $.post("/includes/topnav.php",{ajaxtab:clickID},function(data){$("#mContainer").html(data);});
- },
- error: function(){
- return true;
- }
- });
- return false;
- });
- //