It might be repeated question but still need of time is that I want a solution. I am new to CSS and jQuery, so here is what I am looking for. I have a css like this
.my-selector {
background-size: cover;
something-here1 : 2;
}
Now I want to check whether this my-selector
has backgroud-size
as one of the elements or not, if it has then I want to add new element in same selector.
This I want to do in JavaScript or using jQuery
asked Feb 25, 2015 at 15:30
1 Answer 1
btw: jQuery IS javascript.
if (!$(this).hasClass("my-selector")) {
//rlemons post [link below] deals with this
}
look here for rlemon's anwer for the this part
answered Feb 25, 2015 at 15:53
Comments
lang-js