This code work perfect, and pages replaced correctly and beauty. But if I want to replace page by click button - I see artefacts: show parts of new page, blinking and after navigate to page. For example:
<a href="#main" data-transition="slide" data-direction="reverse" class="ui-back">Main</a>
When I`m trying fire `swiperight` event from code - see that problem too: $('#categories').trigger('swiperight')