EduardET

incorrect Js code

Dec 5th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. jQuery(document).ready(function() {
  3. var container = jQuery("#fixed_floating_menu");
  4. var menu = jQuery("#fixed_floating_menu .et_pb_fullwidth_menu");
  5. var pos = container.position();
  6. jQuery(window).scroll(function() {
  7. var windowpos = jQuery(window).scrollTop();
  8. if (windowpos >= pos.top) {
  9. menu.addClass("stick");
  10. container.addClass("hold");
  11. } else {
  12. menu.removeClass("stick");
  13. container.removeClass("hold");
  14. }
  15. });
  16. });
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment