I want to trigger a function when clicking a :after
For example
.foo:after{
content: "read more";
}
$('foo:after').click(myFunction);
Will this cause any fuzz?
I want to trigger a function when clicking a :after
For example
.foo:after{
content: "read more";
}
$('foo:after').click(myFunction);
Will this cause any fuzz?
You cannot detect or trigger events on pseudo-elements as they are not part of the Document Object Model.
$('foo:after')
Sorry, but this won't work. The :after
pseudo-element is not available to your Javascript code.