Javascript in PAGE_CONTAINER

king8084

Well-known member
unless my syntax is off, i'm unsure why my test script isn't working in page_container:

in page_container:
Code:
<script>
if ( $('body').css('-webkit-font-smoothing') === 'antialiased')
{
           $('body').css({'margin-top', '-50px !important'});
}
</script>
</head>

where inspector shows:
upload_2015-1-17_15-28-29.webp

again, this is just a test and isn't ultimately what i want to do with the script, but not sure why this isn't behaving as expected?
 
Last edited:
appropriate fix:

Code:
<script>
$(document).ready(function(){
if ( $("body").css("-webkit-font-smoothing") === "antialiased") {
$("body").css("margin-top","-50px");
}
});
</script>
 
Back
Top Bottom