Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- compute_top: function compute_top() {
- // to compute from the bottom of the menu, the top offset is incremented by the menu wrap height
- td_affix.top_offset = 0;
- if (jQuery(td_affix.menu_wrap_selector).length && jQuery(td_affix.menu_wrap_selector)) {
- td_affix.top_offset = jQuery(td_affix.menu_wrap_selector).offset().top + jQuery(td_affix.menu_wrap_selector).height();
- }
- //check to see if the menu is at the top of the screen
- if (td_affix.top_offset == (jQuery(td_affix.menu_wrap_selector).height()) + 1) {
- //switch to affix - because the menu is at the top of the page
- //td_affix._affix_on(jQuery(td_affix.menu_selector));
- td_affix.is_top_menu = true;
- } else {
- //check to see the current top offset
- td_affix.is_top_menu = false;
- }
- td_affix.td_events_scroll(jQuery(window).scrollTop());
- //alert(td_affix.top_offset);
- //console.log('computed: ' + td_affix.top_offset);
- },
Advertisement
Add Comment
Please, Sign In to add comment