Wednesday 21 October 2009

Edited Blogspot template

Some regular blog readers may notice that this blog has a flexible width but still has rounded corners. The template I chose was a fixed width template using images for corners, which I generally dislike, having used them in the past without too much cross-browser success.

For this template, I make a 5-minute edit to remove the CSS for any corners and then just added a couple of JQuery includes and a few lines of Javascript:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script src='http://malsup.com/jquery/corner/jquery.corner.js' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function() {
$('#header-wrapper').corner();
$('#main-wrap1').corner();
$('#sidebartop-wrap').corner();
$('#sidebarbottom-wrap1').corner();
$('#footer-wrap1').corner();
});
</script>


JQuery is so cool. I could have gone further and simplifed the HTML, but I couldn't be bothered. However, I have to say, I'm a recent convert to JQuery, having tried Dojo as well. JQuery is just brilliant! I may post more on that later, since I recently created a nice little linked list mechanism, to move items from one list to another (useful for multiple item selection).

No comments:

Post a Comment