I'm trying to create a function which looks for if there is a class in a body which contains the id="skin" so that when you want to change the theme of the whole page, this function does all the work without needing to change each class of all body, below I show you:
console.log($('#skin').is('.skin-black, .skin-black-light, .skin-blue, .skin-blue-light, .skin-green, .skin-green-light, .skin-purple, .skin-purple-light, .skin-red, .skin-red-light, .skin-yellow, .skin-yellow-light,'));
<body class="hold-transition skin-blue sidebar-mini" id="skin">
aldanux, very grateful for the help, but look I will be more specific, I think the problem is mine to not know explain. I look for this function to do this, the .is to locate in the id: body if any of the classes that are skin-something, so that then it is removed and something like this is left and when it is already like this, to add a class so it looks like this: that's what I'm trying to do. What I'm looking for is changing the style of all the views of a page and I do not want to do the tedious work of changing body by body, do you understand me?