0

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

theJango
  • 1,100
  • 10
  • 22

1 Answers1

0

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

Community
  • 1
  • 1
Joe Johnston
  • 2,794
  • 2
  • 31
  • 54