code: function initJQueryEvents(){
      $('#searchDiv').parent().scroll(function() {
          if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight - 100) {
              globalFunc.addNodesInList();
          }
      });
  
      $('#toggleLayout').click(function() {
          toggleLayout();
      });
  
      $("#sliderText").html("Context with <strong>2</strong> hops");
  
      $("#slider").slider({
          range: "max",
          min: 0,
          max: 10,
          value: 2,
          slide: function (event, ui){
              var strHops = " hop";
              if (ui.value > 1){
                  strHops = " hops";
              }
              $("#sliderText").html("Context with <strong>" + ui.value + "</strong>" + strHops);
              NB_HOPS = ui.value;
          }
      });
  }
docs: Initializes the necessary events