Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: I need help in the code

    Its not working. Thanks
    PHP Code:
    <html>
    <
    head>
    <
    meta content="text/html;charset=utf-8" http-equiv="Content-Type">
    <
    meta content="utf-8" http-equiv="encoding">
    <
    title>Multi Color Page</title>
    <
    style type "text/css">
    fieldset {float:leftclear:left;}
    fieldset ul {float:left; list-style-type:none;}
    fieldset ul li {float:leftwidth:automargin-right:10px;}
    </
    style>
    <
    script type="text/javascript">
    jQuery(function($){
    $(
    'input:radio').change(function(){
    $(
    'body').css($(this).attr('name'),$(this).val());
    });
    })
    </script>
    </head>

    <body>
    <fieldset>
    <legend>select your options</legend>
    <p>background-color</p>
    <ul>
    <li><input type="radio" name="background-color" value="white" id="white" checked="checked"/><label for="white">white</label></li>
    <li><input type="radio" name="background-color" value="red" id="red"/><label for="red">red</label></li>
    <li><input type="radio" name="background-color" value="gray" id="gray"/><label for="gray">gray</label></li>
    </ul>

    <p>font-family</p>
    <ul>
    <li><input type="radio" name="font-family" value="Arial" id="arial" checked="checked"/><label for="arial">arial</label></li>
    <li><input type="radio" name="font-family" value="Tahoma" id="tahoma"/><label for="tahoma">tahoma</label></li>
    <li><input type="radio" name="font-family" value="Georgia" id="georgia"/><label for="georgia">Georgia</label></li>
    </ul>

    <p>color</p>
    <ul>
    <li><input type="radio" name="color" value="black" id="black" checked="checked"/><label for="black">black</label></li>
    <li><input type="radio" name="color" value="lime" id="lime"/><label for="lime">lime</label></li>
    <li><input type="radio" name="color" value="cyan" id="cyan"/><label for="cyan">cyan</label></li>
    </ul>

    </fieldset>
    <p>My favorite movie lists</p>
    </body>
    </html> 
    Last edited by gvee; 01-30-14 at 05:36. Reason: Reverted to original content. Please don't remove your question.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What's not working?

    If it's your JS then that's because you've not included the JQuery files
    George
    Home | Blog

Posting Permissions

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