How to remove a css class using jquery on just one screen? is not working

0

I want to use this class throughout the site layout, less on the main screen because there has an image that needs to be at the top, ie (padding-top: 0px).

Class I need to remove on a screen:

body {
padding-top: 50px;
padding-bottom: 20px;
}        

The jQuery function I created to do this and it did not work.

$(document).ready(function () {
$("#intro").removeClass("body");
});

NOTE: intro is the id of the image that at the top (0px)

    
asked by anonymous 05.01.2019 / 01:15

1 answer

0

You are using a word reserved for a class, the correct one is you add a dot at the beginning of the statement, because css is interpreting it as the HTML element.

Do this that should work, note that I only added a . (dot) at the beginning.

.body {
   padding-top: 50px;
   padding-bottom: 20px;
}
    
05.01.2019 / 01:23