my code:
$( ".panel article:first-child" ).prepend( "<p>Test</p>" );
loaded in body. i see <p>Test</p>
in the html in the correct place, but rendered with no height.
any help? thanks.
my code:
$( ".panel article:first-child" ).prepend( "<p>Test</p>" );
loaded in body. i see <p>Test</p>
in the html in the correct place, but rendered with no height.
any help? thanks.
If you want to see its height then you need to prepend it with a certain height
value like this:
$( ".panel article:first-child" ).prepend( "<p style='height:20px'>Test</p>" );
as @david-thomas mentioned, no-repro. the issue was the element i was targeting was rendered after the .prepend. i tested with another target, and worked as expected. sorry for the crappy question.
cheers.