pseudo-elements and pseudo-classes
-
guys; I just searched Google for pseudo-elements and pseudo-classes and i found examples on them. (:before, :first-line, :first-letter, :target, :lang, :checked, and :first-child). my question is: if in jquery selectors ':myfilter' means that the elements should be filtered according to myfilter filter, so how can I select a pseudo-element using jquery.
Help people,so poeple can help you.
-
guys; I just searched Google for pseudo-elements and pseudo-classes and i found examples on them. (:before, :first-line, :first-letter, :target, :lang, :checked, and :first-child). my question is: if in jquery selectors ':myfilter' means that the elements should be filtered according to myfilter filter, so how can I select a pseudo-element using jquery.
Help people,so poeple can help you.
The
:first-child
[^],:checked
[^],:target
[^] and:lang()
[^] selectors are all supported by jQuery: http://api.jquery.com/category/selectors/[^]:first-line
and:first-letter
aren't directly supported, but you might be able to find ways to work around it. For example, this SO answer[^] has a function to return the first line of an element, but it involves a lot of DOM manipulation.:before
doesn't exist in the DOM, so there's really no way to manipulate it using jQuery.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
The
:first-child
[^],:checked
[^],:target
[^] and:lang()
[^] selectors are all supported by jQuery: http://api.jquery.com/category/selectors/[^]:first-line
and:first-letter
aren't directly supported, but you might be able to find ways to work around it. For example, this SO answer[^] has a function to return the first line of an element, but it involves a lot of DOM manipulation.:before
doesn't exist in the DOM, so there's really no way to manipulate it using jQuery.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks, Richard. This is disappointing, In google chrome inspect element, you can see the pseudo-elements :before and :after presented as separate nodes like ::bafore and ::after. but i couldn't fetch them using .chldren, .childNodes, nor with JQuery.
Help people,so poeple can help you.
-
Thanks, Richard. This is disappointing, In google chrome inspect element, you can see the pseudo-elements :before and :after presented as separate nodes like ::bafore and ::after. but i couldn't fetch them using .chldren, .childNodes, nor with JQuery.
Help people,so poeple can help you.