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
    Aug 2011
    Location
    Scotland
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Invalid W3C jQuery slider code

    I am using a jQuery slider on a website but the code comes up with invalid, is there any wat to get around this without using a div tag? Thanks for any help on this:

    Line 26, Column 27: document type does not allow element "div" here
    .before('<div id="buttons">')

    Code:
    <script type="text/javascript">
    $(document).ready(function() {
    $('#slider')
    .before('<div id="buttons">')
    .cycle({
    fx: 'fade',
    pager:  '#buttons'
    });
    });
    </script>

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    This is only W3C telling you that it doesn't know anything about HTML inside Javascript strings. You can just ignore this one!


  •  

    Tags for this Thread

    Posting Permissions

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