Question: My application needs to use data in a text file which is up to 5 GB in size. I cannot load all of this data into RAM as it is far too large.

The data is stored like a table, 5 million records (rows) and 40 columns each containing text that will be converted in memory to either string, ints, or doubles.

I've tried caching only 10 - 100 MB of data in memory and reloading from the file when I need data outside but it is way too slow! When I run calculations because I can randomly jump from any row within the table it would constantly need to open the file, read and close. 

I need something fast, I was thinking of using some sort of DB. I know calculations with large data like this may take a while which is fine. If I do use a DB it needs to be setup on launch of the desktop application and not require some sort of server component to be installed before.

Any tips? Thanks

Answer: 
With this syntax

```
$("#navigation, #content, ... ").bind("swipeleft", function (e) {
  $("body").toggleClass("menu-active");
  return false;
});

```

And you need one for click also 

```
$('#close-sidebar, #id2, #id3, ....').click(function(){
  $("body").toggleClass("menu-active");
  return false;
});

```
```
var $body = $(document.body);

function toggleBody () {
    $body.toggleClass("menu-active");
    return false;
}

$('#open-sidebar, #close-sidebar').click(toggleBody);
$('#top, #content').bind('swiperight swipeleft', toggleBody);
$('#navigation').bind('swipeleft', toggleBody);

```