0

I recently launched a website for a client http://www.bridgechurch.us/ only to recieve complaints of it not displaying correctly on ie8 or ie9. I have confirmed this to be true. IE is pointing to this line of Javascript:

jQuery(function () {

jQuery(".scrollable").scrollable({circular: true}).navigator().autoscroll({interval: 7000});

[...]

Can anyone help me figure out what is wrong with this line of code?

Thank you

UPDATE - FIXED

I figured out that there was a comment before the Doctype Declaration that forced IE into quirks mode.

Ben Dahl
  • 3
  • 3

2 Answers2

1

You have a lot of 404's on that page, mainly related to ie-specific css and border images, which is probably why the page doesn't look like it should. Files like /images/internet_explorer/borderBottomRight.png and /wp-content/themes/Moses/styles/default.css aren't loading.

That being said, looking at the scrollable documentation, there is no .navigator() function off of the return value of scrollable(); and I'm getting the same error in Chrome.

RTigger
  • 1,360
  • 10
  • 11
1

Well, visually, the site doesn't appear to work well at all in IE9 (compared to Chrome). But just looking at the code that adds scrollable() to jQuery, you can see that that function doesn't always return the original element. In your code, if you split the call into two, you might be ok:

jQuery(".scrollable").scrollable({circular: true});
jQuery(".scrollable").navigator().autoscroll({interval: 7000});

I blame the plug-in on this one: functions that extend jQuery are supposed to always return the original elements found by the selector.

Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • Your last comment about `data` and `attr` is incorrect, `data` can be used to other variables besides string, but `attr` is still a valid option. (I'm talking about [this answer](http://stackoverflow.com/a/10691209/601179)) But he clearly did it the wrong way... – gdoron May 21 '12 at 19:22