dom - Implementing a simple floating navigation in Javascript -
I am trying to implement a simple floating navigation using DOM and Javascript. The following script is triggered using the oncroll event, but nothing happens through firebug and debugging is not completely enlightened.
function float_nav () {nav = document.getElementById ("nav_container"); Offset = window Pagewise offset + 'px;'; Nav.style.top = offset; }
You do not have to add; At the end of px
otherwise I do not see anything wrong.
Extra: Why do not you use jQuery or something similar?
Comments
Post a Comment