you should use ```$tableContainer.prop("scrollHeight")``` instead of ```$tableContainer.get(0).scrollHeight```
+
```var $this = $(this);``` and ```$this``` should work instead of ```$tableContainer```