Changed $( this ) into meaningful variables
This commit is contained in:
@@ -259,8 +259,9 @@
|
|||||||
|
|
||||||
// The region section need to be in sync with the map filter.
|
// The region section need to be in sync with the map filter.
|
||||||
lcd.$element.scroll( function () {
|
lcd.$element.scroll( function () {
|
||||||
var scrollTop = $( this ).position().top,
|
var $ulsLanguageList = $( this ),
|
||||||
scrollBottom = $( this ).height();
|
scrollTop = $ulsLanguageList.position().top,
|
||||||
|
scrollBottom = $ulsLanguageList.height();
|
||||||
|
|
||||||
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight / 2 ) {
|
if ( this.offsetHeight + this.scrollTop >= this.scrollHeight / 2 ) {
|
||||||
lcd.$element.trigger( 'scrollend' );
|
lcd.$element.trigger( 'scrollend' );
|
||||||
@@ -269,11 +270,12 @@
|
|||||||
// The region section need to be in sync with the map filter.
|
// The region section need to be in sync with the map filter.
|
||||||
var inviewRegion = 'WW';
|
var inviewRegion = 'WW';
|
||||||
lcd.$element.find( 'div.uls-lcd-region-section' ).each( function () {
|
lcd.$element.find( 'div.uls-lcd-region-section' ).each( function () {
|
||||||
var top = $( this ).position().top,
|
var $lcdRegionSection = $( this ),
|
||||||
height = $( this ).height();
|
top = $lcdRegionSection.position().top,
|
||||||
|
height = $lcdRegionSection.height();
|
||||||
|
|
||||||
if ( top < scrollTop && height > scrollBottom ) {
|
if ( top < scrollTop && height > scrollBottom ) {
|
||||||
inviewRegion = $( this ).attr( 'id' );
|
inviewRegion = $lcdRegionSection.attr( 'id' );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|||||||
Reference in New Issue
Block a user