Project

General

Profile

« Previous | Next » 

Revision b362c60f

Added by Andreas Kohlbecker over 7 years ago

fixing jQuery incompatibility IE >= 9 and Edge

View differences:

modules/cdm_dataportal/js/jquery.cdm.taxonomic_children.js
332 332

  
333 333
      var scrollTarget = this.children.find(".focused");
334 334
      if(scrollTarget){
335
        var scroll_target_offset_top = scrollTarget.position().top;
335
        var position = scrollTarget.position();
336
        if(position == undefined){
337
          // fix for IE >= 9
338
          position = scrollTarget.offset();
339
        }
340
        var scroll_target_offset_top = position.top;
336 341
        this.log("scroll_target_offset_top: " + scroll_target_offset_top + ", offset_container_top: " + this.offset_container_top);
337 342
        this.container.scrollTop(scroll_target_offset_top - this.lineHeight + 1); // +1 yields a better result
338 343
      }

Also available in: Unified diff