Tuesday, March 3, 2015

[Java 8] Lambda Expressions and Variable Scope

http://www.informit.com/articles/article.aspx?p=2303960&seqNum=7

[Java] Local Classes

http://docs.oracle.com/javase/tutorial/java/javaOO/localclasses.html

[Java 8] Difference between final and effectively final in Java

http://codeinventions.blogspot.in/2014/07/difference-between-final-and.html

[JQuery] Get height of multiple divs with jquery

http://stackoverflow.com/questions/14782087/get-height-of-multiple-divs-with-jquery

<div id="parent" style="position: relative;">
      <div id="leftMenu">Here is left menu</div>
      <div id="rightMenu">Here is right menu</div>
</div>

$("[id$='parent']").bind('scroll', function() {
       var scrollerHeight = $("[id$='parent']").outerHeight(true);
      var scrollVal = $("[id$='parent']").scrollTop();
      var top = 0;
       if ( scrollVal > (scrollerHeight - 50)) {
        top = scrollVal - (scrollerHeight - 50);
           $('#rightMenu').css({'position':'absolute','right':'2em','top' :top+'px'});
       } else {
           $('#rightMenu').css({'position':'static','top':'0px'});
       }
});