Jump to content

jquery help


paulmo

Recommended Posts

trying out a rounded corners plug in http://www.atblabs.com/jquery.corners.html and it's not working. have uploaded all js files to root but unsure how to set this up in html page. thanks!

 

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

<div style="background-color:#acc; padding:10px" class="rounded {10px}">
  class="rounded {10px}"
</div>
<script>$(document).ready( function(){
  $('.rounded').corners("4px");
});</script>

Link to comment
Share on other sites

you have 1 too many script tags. try this:

 

<script type="text/javascript" src="jquery-1.2.6.min.js"></script>     
<script type="text/javascript" src="jquery.corners.js"></script>
         
<div style="background-color:#acc; padding:10px" class="rounded {10px}">
  class="rounded {10px}"
</div>

<script type="text/javascript">
$(document).ready( function(){
  $('.rounded').corners("4px");
});
</script>

Link to comment
Share on other sites

thank you aaron! it's working great around div's where there's no php code, and on a page where there's php code, the only way the rounded corners code is working is to put the <script> and function parts of the code around a div that contains no php. then, in the div's with php, i'm still putting the <div style> code. this page takes longer to execute, so that i'm seeing square corners for about half a second before they get rounded.

 

so it's working on a php page, just not real efficiently. any advice? thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.