Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Some help needed

    Hi,
    can any1 help me with my problem.
    I need to make old newspapers available. All new newspaper (in PDF format) is viable, but older ones can not be seen. I need to make a list, who is in a string, with arrows. When you push arrow, line automatically moves to older newspapers. It should look like this..

    The right arrow should navigate to older newspapers.

  2. #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,393
    Thanks
    53
    Thanked 538 Times in 532 Posts

    Lightbulb

    While this does not exactly match your desired display,
    it might get you started or be used until you design
    your own version of the display you want to show...
    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <title> Untitled </title>
    
    <style type="text/css">
    ul {
      float:left;
      margin: 0;   padding: 0;
      white-space: nowrap;
      width: 400px;
      overflow-x: auto; 
      background-color: #ddd;
    }
    ul li {
      display:inline;
      margin:5px;
      cursor:pointer;
    }
    #liPicks { display:inline; width:300px; }
    </style>
    
    </head>
    <body>
    <div id="debug">
     <div id="liPicks"></div>
    </div>
    
    <script type="text/javascript">
    // For: http://www.codingforums.com/showthread.php?t=301611
    
    Array.prototype.makeReverseArray=function(arrSize) {
      var tarr = [];
      for (var i=0; i<arrSize; i++) { tarr.push(i+1); }
      return tarr.reverse();
    }
    Array.prototype.toUL=function(){ 
      return '<ul><li>'+this.join("<\/li> | <li>")+"<\/li><\/ul>"
    }
    
    function liAction(msg) { alert('Chosen: '+msg); }
    
    window.onload = function() {
      var LIpicks = [].makeReverseArray(50).toUL();
      document.getElementById('liPicks').innerHTML = LIpicks;
      var sel = document.getElementById('liPicks').getElementsByTagName('li');
      for (var i=0; i<sel.length; i++) {
        sel[i].value = 50-i;
        sel[i].onclick = function() { liAction(this.value); }
      }
    }
    </script>
    
    </body>
    </html>

  3. Users who have thanked jmrker for this post:

    iRnR (09-16-2013)


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •