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
https://forums.phpfreaks.com/topic/138753-jquery-help/
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
https://forums.phpfreaks.com/topic/138753-jquery-help/#findComment-725529
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
https://forums.phpfreaks.com/topic/138753-jquery-help/#findComment-725785
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.