Bind the language links using jquery on and not in loop

Change-Id: Ic4d2dd2b06acae57060bced9938a219bf8cebd73
This commit is contained in:
Santhosh Thottingal
2012-08-21 17:44:23 +05:30
parent 01ceb4c4f8
commit 5760df80d3

View File

@@ -82,12 +82,6 @@
}
$column.append( $li );
if ( that.options.clickhandler ) {
$li.click( function() {
that.options.clickhandler.call( this, langCode );
} );
}
}
},
/**
@@ -144,6 +138,11 @@
listen: function() {
var that = this;
if ( this.options.clickhandler ) {
this.$element.on( 'click', 'div.row li', function() {
that.options.clickhandler.call( this, $( this ).data( 'code' ) );
} );
}
// The region section need to be in sync with the map filter.
that.$element.scroll( function () {
var inviewRegion = that.$element.find( 'div.uls-lcd-region-section:first' ).attr( 'id' );