Changed $( this ) into meaningful variables

This commit is contained in:
Amir E. Aharoni
2012-10-08 17:34:35 +02:00
parent f14073a21a
commit 77e62c99a5

View File

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