adaptive and js