I'm currently working on a website and it runs correctly in chrome but for some reason IE8 does not want to run any of the javascript/jquery scripts. Even when I call for an alert on page ready, it does not pop up. It is a little sloppy; I've included all of the css and jquery in the actual index.php file and was planning on cleaning it up eventually after I was a little farther along, but enough of my terrible excuses. I've read that a trailing comma after an item can make a website not function correctly in IE, but I cannot find one in my code. I am still learning so I am sure there are many things that could be corrected in my code as well. Sorry for how long it is. Essentially what happens is that all of the hidden divs just hang out and lay overtop one another, and none of the code executes.
<script type="text/javascript">
function video_pop(vimeo_link) {
var vimeo_applet = "";
$('.prompt_inner').text(vimeo_applet);
vimeo_applet = "<div>";
vimeo_applet += "<iframe src=\""+vimeo_link+"\" id=\"vimeo_link\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";
vimeo_applet += "</div>";
$('.prompt_inner').append(vimeo_applet);
$('.prompt_box').css("margin-left", (-(($('.prompt_inner').width())/2)));
$('.prompt_box').css("visibility", "visible");
$('.prompt_background').css("visibility", "visible");
$('.prompt_box').animate({
opacity: '1'
}, 500);
$('.prompt_background').animate({
opacity: '.95'
}, 500);
}
//MAIN MENU FUNCTIONS
function directors() {
$('.menu').stop().fadeOut(1000).hide();
$('#directors').stop().fadeIn(1000);
$('#col_work').stop().fadeOut(1000).hide();
$('#slideshow_container').stop().fadeIn(1000);
}
function contact() {
$('.menu').stop().fadeOut(1000).hide();
$('#main_contact').stop().fadeIn(1000);
$('#col_work').stop().fadeOut(1000).hide();
$('#slideshow_container').stop().fadeIn(1000);
}
function login() {
$('.menu').stop().fadeOut(1000).hide();
$('#login').stop().fadeIn(1000);
$('#col_work').stop().fadeOut(1000).hide();
$('#slideshow_container').stop().fadeIn(1000);
}
function work() {
$('.menu').stop().fadeOut(1000).hide();
clearInterval(slideshow_int);
$('#slideshow_container').stop().fadeOut(1000).hide();
$('#col_work').stop().fadeIn(1000);
}
function showmenu() {
$('#back_button').stop().fadeOut(1000).hide();
$('#director_set').stop().fadeOut(1000).hide();
$('#holness').stop().hide();
$('#pryce').stop().hide();
$('#ntiri').stop().hide();
$('#quiroz').stop().hide();
$('#col_work').stop().hide();
$('#main_menu').stop().fadeIn(1000);
start_slideshow();
$('#slideshow_container').stop().fadeIn(1000);
}
//DIRECTOR FILES
function director(x) {
$('.menu').stop().fadeOut(1000);
$('#main_menu').stop().fadeOut(1000);
$('#col_work').stop().fadeOut(1000).hide();
clearInterval(slideshow_int);
$('#slideshow_container').stop().fadeOut(1000);
$('#back_button').stop().fadeIn(1000);
$('#director_set').stop().fadeIn(1000);
if (x==="1") {
$('#holness').stop().fadeIn(1000);
}
else if (x==="2") {
$('#pryce').stop().fadeIn(1000);
}
else if (x==="3") {
$('#ntiri').stop().fadeIn(1000);
}
else if (x==="4") {
$('#quiroz').stop().fadeIn(1000);
}
}
function start_slideshow() {
slideshow_int = setInterval(function() {
$('#slides > div:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('#slides');
}, 5000);
}
$(document).ready(function() {
//HIDE MENUS
$('.menu').hide();
$('#director_set').hide();
$('#back_button').hide();
$('#holness').stop().hide();
$('#pryce').stop().hide();
$('#ntiri').stop().hide();
$('#quiroz').stop().hide();
$('#col_work').stop().hide();
video_pop("<?php
$query = "SELECT * FROM global WHERE id=1";
$queryobj = mysql_query($query);
$result = mysql_fetch_array($queryobj);
echo $result['ovideo'] ?>");
$('.prompt_background').click(function() {
$('.prompt_box').animate({
opacity: '0'
}, 500, function() {
$('.prompt_box').css("visibility", "hidden");
});
$(this).animate({
opacity: '0'
}, 500, function() {
$(this).css("visibility", "hidden");
var vimeo_applet = "";
$('.prompt_inner').text(vimeo_applet);
});
});
//SLIDESHOW CONTROL
$('#slides > div:gt(0)').hide();
start_slideshow();
//WORK MOUSEOVER
<?php
$queryobj = mysql_query("SELECT * FROM global_thumbnails");
$total_global_thumbs = mysql_num_rows($queryobj);
for ($i=1; $i<=$total_global_thumbs; $i++) {
$queryobj = mysql_query("SELECT * FROM global_thumbnails WHERE position = {$i}");
$result = mysql_fetch_array($queryobj);
$global_still_title = strtoupper($result['title']);
echo "$('#global_stills img:eq(".($i-1).")').mouseover(function() {
$('#global_titles').text(\"{$global_still_title}\");
});
";
}
?>
$('#global_stills img').mouseout(function() {
$('#global_titles').text("");
});
});
</script>