Forums

[resolved] jQuery error (3 posts)

  1. cmentality2
    Member
    Posted 2 years ago #

    Hello,

    I have some sort of unsupported lines in an jQuery code.
    After 2 errors in the Markup Validation, it can't even check my pages anymore.
    Is there somebody who can help me with this? It's the following code that has some lines which cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding).

    $("a.switch_thumb").click(function () {
    $("a.switch_thumb").toggleClass("swap");
    $("ul.display").fadeOut("fast", function() {
    $(this).fadeIn("fast").toggleClass("thumb_view");
    });

    $.cookie('view_State', $('ul.display').is('.thumb_view') ? 'list' : 'thumbs' );
    });

    // COOKIES
    // view state
    var view_State = $.cookie('view_State');
    // Set the user’s selection for the viewState
    if (view_State == 'thumbs') {
    $("ul.display").addClass("thumb_view");
    $("span.switch_thumb").addClass("swap");
    };

    });

    I think I got the error in the line that is bold.

  2. AxelYa
    Member
    Posted 2 years ago #

    Try to take out this line
    // Set the user�s selection for the viewState

  3. cmentality2
    Member
    Posted 2 years ago #

    Wow!
    Thank you AxelYa!
    That was it!

    Topic resolved! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic