Class still exist in page source

Hi, I created a jQuery to remove a class. I reload my page and went on inspect element and the class was not there. But when I view the page source of that page, I search for the class I removed and it’s still there. Here’s the code:

	if ($( "div.slide" ).hasClass( "testimonial_rotator_slide" )){

The website im working on:

Look for the testimonials below the page. The Class I want to remove is “hreview”

Please tell me what’s wrong Thanks.

Hey Genesis,

As far as I know, the ‘view source’ option shows the markup before any JavaScript has been executed, so you won’t see any changes. Using the developer tools (as you’ve done) will show you the current page structure, including any changes made with JS.

Does this also apply when testing your site in Structured Data Testing Tool? I checked my site and got an error. the “hreview” is what the system is telling me that error is. What I did is I review the class and Validate the structure again and the error was gone. So that’s why I removed the class using jquery thinking that when I run Data Testing Tool it will now be fine.

What’s a Structured Data Testing Tool?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.