Reputation: 1005
Example:
$(document).ready(function(){
height = $('#container-bottom:before').height();
alert(height);
});
Alerts null
(and I know the value is not null
of course).
Upvotes: 0
Views: 130
Reputation: 27667
Unfortuantely CCS pseudo-elements (like :before
, :after
) are not part of the DOM (although they're rendered as if they were) - thus they can't be manipulated with jQuery.
See: Selecting and manipulating CSS pseudo-elements such as ::before and ::after using jQuery
Upvotes: 5