Example:
$(document).ready(function(){
height = $('#container-bottom:before').height();
alert(height);
});
Alerts null
(and I know the value is not null
of course).
Example:
$(document).ready(function(){
height = $('#container-bottom:before').height();
alert(height);
});
Alerts null
(and I know the value is not null
of course).
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