Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**** SLIDE ****/
- jQuery('#accordion').bind('accordionactivate', function(event, ui) {
- var something = jQuery(this).find('.ui-accordion-header-active');
- // if (something != 'null'){
- if (something != 'null'){
- ScrollTo(something);
- console.log(something);
- } else {
- console.log('is null');
- }
- });
- function ScrollTo(elem){
- // var fullw = jQuery( window ).height();
- var offset = jQuery(elem).offset();
- // console.log(offset.top);
- var newOffset = offset.top - 105;
- jQuery("body, html").animate({
- scrollTop: newOffset
- }, 600);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement