locked
0x800a139e (exception thrown in jquery-2.0.3.js - syntax error)

    Question

  • Hi, i need some help here.

    I'm using JQuery 2.0.3 installed through the NuGet Package Manager (Visual Studio 2013) with JS+HTML

    However, when I write a simple code to dynamically create div using JQuery and run it, it gives me this error:

    WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/2.0)'. 
    Exception was thrown at line 1504, column 4 in ms-appx://cfc6264e-a4a8-4932-a7bf-7e4cf8f0e857/Scripts/jquery-2.0.3.js
    0x800a139e - JavaScript runtime error: SyntaxError
    Exception was thrown at line 1521, column 4 in ms-appx://cfc6264e-a4a8-4932-a7bf-7e4cf8f0e857/Scripts/jquery-2.0.3.js
    0x800a139e - JavaScript runtime error: SyntaxError

    This is each of the line where the exception was thrown:

    // Opera 10-11 does not throw on post-comma invalid pseudos
    			div.querySelectorAll("*,:x"); //this is line 1504
    			rbuggyQSA.push(",.*:");


    assert(function( div ) {
    			// Check to see if it's possible to do matchesSelector
    			// on a disconnected node (IE 9)
    			support.disconnectedMatch = matches.call( div, "div" );
    
    			// This should fail with an exception
    			// Gecko does not error, returns false instead
    			matches.call( div, "[s!='']:x" ); //this is line 1521
    			rbuggyMatches.push( "!=", pseudos );

    and this is the code i write to test jquery

     $('<div id="statusTab"></div>').css(CSS).appendTo('#container');
            $("<p />", { text: "PLAYER STATUS", id: "greeting", css: { color: 'darkblue' } }).appendTo("#statusTab");
    
            //create table
            $('#statusTab').append('<table id="data"></table>');
            $("#data").append('<tr>' +
                    '<td>LV</td>' +
                    '<td>M</td>' +
                    '<td><img src="data/img/sprite/coin.png"  width="225px" height="225px" /></td>' +
                '</tr>');

    Any ideas why that error appear? I test the jquery code in fiddle and it runs fine, so i don't understand why it gives me that error....


    Gretchelin

    Tuesday, January 21, 2014 1:13 PM

All replies