html - :after pseudo-element and tags -


I have just created a simple page where I tried to emulate Ajax with CSS. To do this, I want to create an invisible radio button with visual labels, as soon as a user clicks on the label, an external CSS-file should be loaded. There is only one problem: Tags are printed in plain form as plain text. Is there any way to handle it?

Edit: According to the request, my code:

  & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Demo: Ajax without Jax & lt; / Title & gt; & Lt; Style type = "text / css" & gt; # Loader: Checked: {content: ' '; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "rad" & gt; Input type = "radio" id = "loader" /> gt; Loader & gt; Loader & lt; / Label & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Yes, that's as simple as that.

Just speak, you can not do that the generated content is seen as a presentation, and this The type is actually not included in the DOM.

Note that the generated content is sung only-it does not appear in the DOM tree. In other words, the material generated does not change the document as such a presentation.

Thus whatever you try to insert, it will be sung in plain text. Another implication is that whatever you generate from content you can not manipulate with javascript. So you're stuck with javascript for this type of thing

Also see:


Comments