How can I determine whether or not a class exist in the DOM?

ساخت وبلاگ
I create a stylesheet using document.createElement("style") and myStyle.innerHTML = the entire style sheet string. I give it an id and wait until I know the stylesheet exists in the DOM.

I create an element using createElement("div").
I assign it a class name that I know is in the style sheet ex. myDiv.className = "divBlock".
I check console.log(myDiv.className) and it is correct.

Still no matter what I do I cannot make Chrome apply the style properties in the class to the element.
Using...

How can I determine whether or not a class exist in the DOM? WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 7 تاريخ : پنجشنبه 14 تير 1403 ساعت: 20:12