Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Adding Smooth Corners
Topic Started: Dec 10 2007, 04:22 PM (6,279 Views)
Nicola
Darth Vader's Sewing Instructor

Adding Smooth Corners

Firstly, this isn't my script, it's Seth's. This jQuery takes advantage of the script he created to give the smooth corners to areas on the blog.

Please note that adding this to the #logo, #submenu or #nav will obscure the drop-down lists depending on the placement of the <!-- TOP MENU -->


See the full extent of this in play here. Select 'Smooth Corners via jQuery' from the Theme selector. You'll immediately see the possibilities that are available when using this script.




The jQuery Required

All you need to do is add this to the end of your theme layout (or 'Above the Copyright' in the Board Template )

The jQuery Required
 

<script type="text/javascript">
//<![CDATA[
$("#submenu").corner("15px");
//]]>
</script>



  • #submenu: You'll insert the class or ID you wish to add the effect to. On the test board you'll see that I've added it to #logo, #submenu, #submenu_bar, #wrap and .category.
  • 15px: Input the radius of the corners. Alternatively you can set the radius per corner using this method:
    Example 1
     

    $("#submenu").corner("15px 20px 25px 30px");

    Top - Right - Bottom - Left respectively.
    Or:
    Example 2
     

    $("#submenu").corner("15px 20px");

    Top/bottom - Right/Left respectively.


Adding more corners

If you want to do it in several places, just simply add them onto a new line.
Code used on test board
 

<script type="text/javascript">
//<![CDATA[
$("#wrap").corner("15px");
$("#logo").corner("15px 40px 15px 40px");
$("#submenu").corner("15px");
$("#submenu_bar").corner("15px");
$(".category").corner("15px");
//]]>
</script>





Obviously this is pretty nifty, if used well you could eradicate the need for image borders. It works in every commonly used browser. It even works in IE (if you've over-gasped, I apologise)
Now there is no excuse for not doing something quite pretty with your themes :P.

Enjoy!
Offline Profile Quote Post Goto Top
 
Syyrax
Member Avatar
Hmm..
[ *  * ]
Very nice Nicola, keep up the good work. :)
Offline Profile Quote Post Goto Top
 
Chuck
Member Avatar
ThaDon
[ *  * ]
Thanks Nicola :)
Offline Profile Quote Post Goto Top
 
Tim
Member Avatar
Timmeh
[ *  *  *  * ]
You can apply styling on the corners as well. Heres a list of them:
http://methvin.com/jquery/jq-corner-demo.html
Offline Profile Quote Post Goto Top
 
badtzmaru
Member Avatar
Member
[ *  *  * ]
Cooool... *_* I can't wait to see future themes implement this!! The different kinds of borders are so cool!

*tracks topic in case she ever tries to skin =_=*
Offline Profile Quote Post Goto Top
 
DynamicIP
Member Avatar
I'm known as Nor
[ *  * ]
Preview?
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor

Tim
Dec 11 2007, 04:30 AM
You can apply styling on the corners as well. Heres a list of them:
http://methvin.com/jquery/jq-corner-demo.html
! I remember Seth showing me that list months ago, hehe :D

Quote:
 
Preview?

You know it wouldn't hurt to actually read my post. I linked to my test board which has an extremely apparent preview all over it.
Offline Profile Quote Post Goto Top
 
Mephiles
Member Avatar
Member
[ *  *  * ]
Nicola. I found a bug: I did it on the logo and it makes the logo cover the dropdown menus. You can see it on my board: http://s1.zetaboards.com/Omega_Studios/index/
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor

I have to firstly say, it's not a bug :P, because I already mentioned it doesn't work in some areas.
Secondly, I can't see the problem because I am not a logged in user. Perhaps you could screenshot it?
Offline Profile Quote Post Goto Top
 
Nicola
Darth Vader's Sewing Instructor

Mephiles
Dec 11 2007, 04:29 PM
Nicola. I found a bug: I did it on the logo and it makes the logo cover the dropdown menus. You can see it on my board: http://s1.zetaboards.com/Omega_Studios/index/
I now see what you mean, I was testing this last night. Unfortunately I don't see any way around it.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply