Results 1 to 3 of 3

Thread: DD Scrollable Content and validation

  1. #1
    Join Date
    May 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default DD Scrollable Content and validation

    1) Script Title: DD Scrollable Content

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici.../scrollc2.htm#

    3) Describe problem: I am trying to validate a XHTML page that uses the Scrollable Content. Long story, but I *can't* make it anything else than XHTML and I *can't* remove the Scrollable Content from it. The w3c validator has issues with the & and < of the script, but if I change them to &amp; and &lt; the script won't work anymore. Please help me, I'm desperate!!!

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,776
    Thanks
    2
    Thanked 412 Times in 407 Posts

    Default

    Code:
    <script type="text/javascript">
    /*<![CDATA[*/
    
    /******************************************
    * Scrollable content script II-  Dynamic Drive (www.dynamicdrive.com)
    * Visit http://www.dynamicdrive.com/ for full source code
    * This notice must stay intact for use
    ******************************************/
    
    // modified 17-October-2011
    
    
    function move(id,spd){
     var obj=document.getElementById(id),max=-obj.offsetHeight+obj.parentNode.offsetHeight,top=parseInt(obj.style.top);
     if ((spd>0&&top<=0)||(spd<0&&top>=max)){
      obj.style.top=top+spd+"px";
      move.to=setTimeout(function(){ move(id,spd); },20);
     }
     else {
      obj.style.top=(spd>0?0:max)+"px";
     }
    }
    
    
    /*]]>*/
    </script>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    cristina86 (05-04-2013)

  4. #3
    Join Date
    May 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Works perfectly! Thanks a ton!

Similar Threads

  1. Replies: 2
    Last Post: 10-18-2012, 11:07 AM
  2. Problem combining Accordion Content script v1.9 with Scrollable Content II
    By emeraldsentinel in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 11-02-2010, 10:00 AM
  3. Replies: 9
    Last Post: 04-02-2007, 12:35 AM
  4. Scrollable content script II & switch content not working together?!
    By mistermod in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-02-2007, 11:09 PM
  5. Replies: 1
    Last Post: 10-02-2006, 04:27 PM

Bookmarks

Posting Permissions

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