How to open new page without refresh in full-screen mode using jquery

Viewed 942

I want to open a page without refreshing and changing current mode (full-screen mode) in jquery, In my page the full-screen is open by default and I would like to redirect users in another page without exiting full-screen and with refreshing.

I use history.pushState() but it doesn't work for me. Here's a small piece of my code

<a onclick="history.pushState({},'Another page','./anotherpage?t=abc');" class="btn waves-effect waves-light orange" style="margin-top: 45px; width: 98%;">Next</a>

Hope you will understand, please help to solve my problem.

1 Answers

This should work:

<a onclick="openFullscreen()" class="btn waves-effect waves-light orange" style="margin-top: 45px; width: 98%;">Next</a>

<script>
    function openFullscreen() {
        var win = window.open('https://example.com','full','dependent=yes, fullscreen=yes');
        win.focus();
    }
</script>
Related