Quick page navigation with html5 slider and jquery + php

Started on the old forum in April 2018 · view the original in the archive · old links redirect here

No replies · 29 views · started 8 years ago · 1 min read

something else Fellow · 2,296 posts #1
<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>

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close