Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE8 only - Object doesn't support property or method 'widget'

I am getting an error related to [jCoverflip][1] that only occurs in IE8. The following error occurs:

SCRIPT438: Object doesn't support property or method 'widget' jquery.jcoverflip.js, line 508 character 1

which relates to the following code:

$.widget( 'ui.jcoverflip', {

I have jQuery and jQueryUI both included, before the script, plus the script runs fine in all other browsers.

Whats causing the issue?

like image 845
rickyduck Avatar asked Jan 04 '12 13:01

rickyduck


2 Answers

You seem to be loading jquery twice:

<!-- First here -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/./scripts/jquery-ui-1.7.2.custom.js"></script>
<!-- Then again here -->
<script type="text/javascript" src="/scripts/jquery.js"></script>

They appear to be v1.3.2 and v1.0.4 (!), respectively. Those are completely out of date. I don't know what jQuery UI 1.7.2's requirements are, but I'm sure v1.0.4 won't do it. v1.3.2 might, jQuery UI 1.7.2 is a couple of years old. (You might at least look at jQuery UI 1.7.3, which says it's for jQuery v1.3.2.)

Also, you're using MooTools on the page, but I don't immediately see where you're calling jQuery.noConflict() (I didn't go digging all that deep). That could well be the problem, MooTools and jQuery both try to use $. To avoid a conflict, immediately after loading jQuery, do this:

<script>
jQuery.noConflict();
</script>
like image 126
T.J. Crowder Avatar answered Oct 04 '22 10:10

T.J. Crowder


I had similiar problem. There is jquery.ui.widget.js which wasn't included. My problem got solved after including it.

like image 34
user3323009 Avatar answered Oct 04 '22 12:10

user3323009