Title: jQuery error
Last modified: August 19, 2016

---

# jQuery error

 *  Resolved [cmentality2](https://wordpress.org/support/users/cmentality2/)
 * (@cmentality2)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/jquery-error/)
 * Hello,
 * I have some sort of unsupported lines in an jQuery code.
    After 2 errors in the
   [Markup Validation](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.coolmentality.com%2Fcms%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.767),
   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.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [axelya](https://wordpress.org/support/users/axelya/)
 * (@axelya)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/jquery-error/#post-1508196)
 * Try to take out this line
    // Set the user�s selection for the viewState
 *  Thread Starter [cmentality2](https://wordpress.org/support/users/cmentality2/)
 * (@cmentality2)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/jquery-error/#post-1508221)
 * Wow!
    Thank you AxelYa! That was it!
 * Topic resolved! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘jQuery error’ is closed to new replies.

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [markup validation](https://wordpress.org/support/topic-tag/markup-validation/)
 * [utf-8](https://wordpress.org/support/topic-tag/utf-8/)

 * 2 replies
 * 2 participants
 * Last reply from: [cmentality2](https://wordpress.org/support/users/cmentality2/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/jquery-error/#post-1508221)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
