Good day. I encountered the following problem: I need to put a button in a pseudo-element. Something like this: content: '<button>Нажать</button>' . How to do it right?
2 answers
Dig to the side:
http://mattweb.ru/moj-blog/javascript-jquery/item/101-izmenyaem-psevdoelement-after-s-pomoschiyu-jquery
https://toster.ru/q/72270
How to change pseudo-element before or after using JS
In a nutshell, you can’t change after - it’s not at all, all of the above - crutches, like replacing a class or adding 1 more element, etc. Your button will not work in any way :)
|
A click on a pseudo-element does not work. Therefore, to hide the button there - it is possible, but absolutely no use.
- 2Sasha Vdodovich, if you don’t feel sorry for the time, share your experience how you can `hide the` button there ... ... - Air
- developer.mozilla.org/ru/docs/Web/CSS/content ... - Alexander
|
:aftercannot insert the tag, more about pseudo- elements - css.yoksel.ru/content - HamSter