But if you run that same line again, the classes are added again. It will keep doing it every time you run said line, so you will have classes added to the element over and over which will look like ... <body class="class1 class2 class1 class2 class1... so on and so forth.
I am an awful programmer, especially with javascript, but this change has worked (not sure how to commit this or whatever?)
If you are adding multiple classes, it works the first time, for example:
x$('div').addClass('myclass1 myclass2 myclassXXX');
But if you run that same line again, the classes are added again. It will keep doing it every time you run said line, so you will have classes added to the element over and over which will look like ... <body class="class1 class2 class1 class2 class1... so on and so forth.
I am an awful programmer, especially with javascript, but this change has worked (not sure how to commit this or whatever?)