Ionic 3 Css does not work when navigate to reading page second time

reading.html:

 
reading.ts: ngOnInit() { this.content.ionScrollEnd.subscribe((data)=>{
  let dimensions = this.content.getContentDimensions();
  let scrollTop = this.content.scrollTop;
  let contentHeight = dimensions.contentHeight;
  let scrollHeight = dimensions.scrollHeight;

  if ( (scrollTop + contentHeight + 20) > scrollHeight) {
   console.log("hi");
  
    $("#segment").css("display","none");
    $("#scrolltop").css("display","block");
    
    
  }
  
   else {
    console.log("up");
  }

});

}
Screenshot%20(58)
Screenshot%20(59)
first time its work great but scond time manu did not hide