Quick page navigation with html5 slider and jquery + php

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • script Quick page navigation with html5 slider and jquery + php

    Code:
    <html>
        <head>
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        </head>
        <body>
            <?php
                $maxPageNumber = 10;
                $currentPageNumber = 5;
                echo '1 <input type="range" min="1" max="'.$maxPageNumber.'" id="pagerange" value="'.$currentPageNumber.'"/> ' + $maxPageNumber;
            ?>
            <script type="text/javascript">    
                $("#pagerange").change(function(){
                      window.location.replace("https://sitename.con/page/" + $(this).val());
                });
            </script>
        </body>
    </html>
Working...
X