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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts

    jquery rounded corners sample not working

    I'm trying to get a very simple jquery plugin to work - it's the corners plugin but it doesn't display a rounded rectangle, only the text displays - I must be missing something simple?

    Thanks...

    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <
    HTML>
     <
    HEAD>
      <
    TITLE> New Document </TITLE>
      <
    META NAME="Generator" CONTENT="EditPlus">
      <
    META NAME="Author" CONTENT="">
      <
    META NAME="Keywords" CONTENT="">
      <
    META NAME="Description" CONTENT="">

    <
    script type="text/javascript" src="jquery-1.2.6.js"></script>
    <script type="text/javascript" src="jquery.corner.js"></script>

    <script type="text/javascript">
    $(document).ready(function(){

    $("div.box").corner();

    });
    </script>

    </HEAD>

    <BODY>

    <div id="box1" class="box">
    this would be the content
    </div>

    </BODY>
    </HTML> 
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Quote Originally Posted by rfresh View Post
    I'm trying to get a very simple jquery plugin to work - it's the corners plugin but it doesn't display a rounded rectangle, only the text displays - I must be missing something simple?
    Code:
    ...
    <script type="text/javascript" src="jquery-1.2.6.js"></script>
    <script type="text/javascript" src="jquery.corner.js"></script>
    
    <script type="text/javascript">
    $(document).ready(function(){
    
    $("div.box").corner();
    
    });
    </script>
    ...
    i'm guessing ur refering to the corners plugin which means that u've to link to

    Code:
    <script type="text/javascript" src="jquery.corners.js"></script
    and call it like this
    Code:
    $("div.box").corners();
    just as the example tells you to do :|
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Set the background color in CSS.

    <style type="text/css">
    .box {
    background-color : #AAA;
    }
    </style>

  • #4
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Quote Originally Posted by ShaF View Post
    Set the background color in CSS.
    yup...most importantly
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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