• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Javascript in PAGE_CONTAINER

king8084

Active member
#1
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.png

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:

king8084

Active member
#2
appropriate fix:

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