3

I have an error on my site:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Timestamp: Fri, 27 Jul 2012 08:54:50 UTC


Message: Unexpected call to method or property access.
Line: 5855
Char: 5
Code: 0
URI: http://garmonia-znakomstva.ru/js/jquery-1.7.2.js

Is this jQuery incompatible with IE8 or some my error?

Error occuring while opening http://garmonia-znakomstva.ru/

CODE

This is jQuery code fragment:

prepend: function() {
    return this.domManip(arguments, true, function( elem ) {
        if ( this.nodeType === 1 ) {
5855:           this.insertBefore( elem, this.firstChild );
        }
    });
},
Aron Rotteveel
  • 81,193
  • 17
  • 104
  • 128
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
  • 3
    Always include the relevant code and markup **in the question itself**, don't just link. Links can rot (and links like that one usually do), and people shouldn't have to follow links to random websites in order to help you. More: http://meta.stackexchange.com/questions/118392/add-stack-overfow-faq-entry-or-similar-for-putting-code-in-the-question – T.J. Crowder Jul 27 '12 at 09:00
  • *"Is this jQuery incompatible with IE8...?"* Of course not. – T.J. Crowder Jul 27 '12 at 09:02
  • I think you might find your answer in here : http://stackoverflow.com/questions/2275702/jquery-first-child-of-this – mnmnc Jul 27 '12 at 09:02
  • Meh, the error points out to `.prepend`, yet there is no custom code that calls `.prepend` – Esailija Jul 27 '12 at 09:05
  • Install IE9 in a VM, and switch it to compatibility mode - it has a much better debugger, however, some of the bugs are fixed in it compared to 'real' IE8. Issue could be that you want to prepend the element before itself or prepend it to itself? – Aadaam Jul 27 '12 at 09:11
  • 1
    I have so far nailed it to `prependTo(this.headers)` in the jQuery UI accordion code... so it's being used wrong or just a buggy plugin – Esailija Jul 27 '12 at 09:13
  • @Esailija can you hint me where to look for jQuery UI accordion compatibility list? – Suzan Cioc Jul 27 '12 at 09:17

1 Answers1

9

An error occurs when the jquery meets <script> tag inside the div#accordion. Try to move the tag <script> out

Kir
  • 694
  • 4
  • 7
  • I just googled and found out this as well, I didn't notice the script tag there yet, but I noticed there are multiple elements with the same ID. Should probably mention that as well, +1 – Esailija Jul 27 '12 at 09:20
  • 1
    +1. IE 7/8 chucks a wobbly at any code other than the

    +
    structure for each tab in the accordion. Any tag outside those two and it will break the accordion.

    – Cyntech Aug 27 '13 at 02:04