I have a problem with ajax requests, which forces me to use javascript linking. I link this way:
window.location.href = ('file:///android_asset/www/custom/kontakty.html');
I would like to know is it possible to set transition/animation when such link is clicked.
Not reliably, no..
If you are running a script until the browser changes location.. chances are that with most browsers the script would get killed once it established a connection.
What you could probably do is request the page via ajax and replace the body tag or whole page in the success handler, where you could also stop/finish your animation.