I have some code that depends on the css being loaded.
I load css on the header before I load the javascripts on the footer
$(window).load
bar_position = $(\'body\').height() - 38 #38 is the size of the bar
width = $(\'body\').width()
console.log(bar_position)
if (width <= 480) #480 is the mobile width
console.log(\"Entered\");
$(\'#accounts-bar\').css(\"top\", bar_position)
return
I tried $(window).ready, $(window).load but all of them fail





Rating:
The post jquery – Running Javascript after CSS is fully loaded appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/jquery-running-javascript-after-css-is-fully-loaded.html
No comments:
Post a Comment