My HTML string is populated with elements such as button
, li
, span
, and more.
I am looking to add specific styles to buttons based on their class name.
For example, if
button.btn {
some styles
}
and
button.btn-success {
some other styles
}
Once the styles are applied, I need to append this modified HTML string to the body. How can I achieve this using jQuery? Your assistance would be greatly appreciated.
Thank you in advance.