JavaScript How to calculate the position of custom scrollbar?

I have a table and i created own scrollbar for iPad in my project.

Now, the table is moving as the user touch and drag it, but how to move my scrollbar according to that table.

I tried but for me its working very strange. For example, if table moves right, then my scrollbar moving left. Since i am not good in Math, i cant do the calculation correctly.

how can i make my scrollbar ( scrolldiv1 and scrolldiv2 ) work perfectly in iPad ?

This is my code that i tried. plnkr.co/edit/KeKvldo3KdiC9JF5VMTH?p=preview

I don't want to use any plugins for a scrollbar.

Answer:1

I would like to see this column, I can see it here https://developers.google.com/web/fundamentals/performance/resource-prioritization But I can't see it inside my Chrome Dev tools's Network tab. My ...

I would like to see this column, I can see it here https://developers.google.com/web/fundamentals/performance/resource-prioritization But I can't see it inside my Chrome Dev tools's Network tab. My ...

I have a list of airports in XML format which I would like to use with jquery autocomplete. The XML file looks like this: <item code="AAR" airport="Aarhus" country="Denmark" /> When a ...

I have a list of airports in XML format which I would like to use with jquery autocomplete. The XML file looks like this: <item code="AAR" airport="Aarhus" country="Denmark" /> When a ...

  1. jquery autocomplete from database c#
  2. jquery autocomplete from database
  3. jquery autocomplete from database javascript
  4. jquery autocomplete from json
  5. jquery autocomplete from list
  6. jquery autocomplete from array
  7. jquery autocomplete from database php
  8. jquery autocomplete from json file
  9. jquery autocomplete from database java
  10. jquery autocomplete from api
  11. jquery autocomplete from database spring mvc example
  12. jquery autocomplete from database jsp
  13. jquery autocomplete from database c# mvc
  14. jquery autocomplete from ajax
  15. jquery autocomplete from database asp.net
  16. jquery autocomplete from sharepoint list
  17. jquery autocomplete from database laravel
  18. jquery autocomplete from database mvc
  19. jquery autocomplete from json array
  20. jquery autocomplete from mysql

I'm wanting my javascript file to control two html5 files simultaneously. <!DOCTYPE html> <html> <head> <title>tryAgainPage1</title> <meta charset="UTF-8"> &...

I'm wanting my javascript file to control two html5 files simultaneously. <!DOCTYPE html> <html> <head> <title>tryAgainPage1</title> <meta charset="UTF-8"> &...

My html code as below: <div class="formContent"> <label for="title">Data Collection Title:</label><p>Western Australia</p><br/> <...

My html code as below: <div class="formContent"> <label for="title">Data Collection Title:</label><p>Western Australia</p><br/> <...

  1. javascript nested element
  2. js nested element
  3. javascript get nested element
  4. javascript select nested element
  5. javascript get nested element by class
  6. javascript find nested element
  7. javascript get nested element by id
  8. javascript find nested element by class
  9. javascript create nested element
  10. javascript remove nested element
  11. javascript target nested element
  12. javascript find nested element by id
  13. javascript scroll nested element
  14. javascript get nested element by tag
  15. javascript access nested element
  16. javascript nested array element
  17. javascript hide nested element
  18. javascript update nested element
  19. js get nested element
  20. js select nested element