jQuery for TopStyle

Posted in General, Programming with tags , , , on February 13, 2009 by mattzur

I’ve been using TopStyle for a code editor ever since the beginning.  Before this, I used HomeSite, both of which have been developed by Nick Bradbury.  I’m proud to say I’ve had input in the various versions of both programs over this  years.

For HomeSite, I developed both a PHP toolbar and Mivascript toolbar.  These haven’t been updated in a long time, but still should work with HS.  I’ve also been a regular advocate for features, suggestions and improvements as well.

Currently TopStyle 4 is now under the direction of a new developer, but I have to say I’ve been very pleased with the responsiveness, willingness to add features, and his support.  So much so that I have created a jQuery toolbar, which is now being included in the latest beta.

jQuery toolbar for TopStyle4

Matching the Design

Posted in Sites with tags , , , on December 30, 2008 by mattzur

 

design a

design a

One of the challenges faced with building any web site is getting it to look like the design comp.  Z Drinks had a particularly challenging problem as show in “design a”.  This is fairly simple to do with css, but not on select and option tags.
 

 

 

screenshot a

screenshot a

The problem is that select/drop down boxes are limited in what you can style.  The reason for this is that they take their look from the browser and/or operating system as show in “screenshot a”.  Each browser: Firefox, Safari, and Opera renders the select box differently. 

 

 

How do we get “screenshot a” to look like “design a” ? Using jQuery we can transform the select box into something more advantageous for styling, like a list item. I searched around and found a few plugins, but in the end decided to write my own.  This plugin will take any select tag on a page that you choose and transform it into a list item for easier styling.

So for example it will take this code:

<select name="forum_id" id="forum-id">
    <option value="0">Any</option>
    <option value="1">Hot or Not</option>
    <option value="2">Last Night</option>
    <option value="3">Missed Connections</option>
    <option value="4">Specials</option>
    <option value="5">Everything Else</option>
</select>

and turn it into this:

<ul id="val-forum_id">
<li>
    <a href="#val-forum_id" class="val-forum_id-0" title="Any" 
id="val-forum_id-selected">Any</a>
    <ul>
        <li class="val-forum_id-0" id="val-forum_id-selected">Any</li>
        <li class="val-forum_id-1"> Hot or Not</li>
        <li class="val-forum_id-2"> Last Night</li>
        <li class="val-forum_id-3"> Missed Connections</li>
        <li class="val-forum_id-4"> Specials</li>
        <li class="val-forum_id-5"> Everything Else</li>
    </ul>
</li>
</ul>
<input type="hidden" id="val-forum_id-hidden" value="0" name="forum_id"/>

To get this to work, all you need is:

  1. jQuery
  2. zselect plugin
  3. call it like this:  $(’select’).zselect();

Z Drinks has Launched!

Posted in Sites with tags , , , , , on December 22, 2008 by mattzur

Z Drinks Forum ScreenshotOn December 13th, 2008 I launched a project I had been working on for months… Z Drinks.  I want to give a big thank you to dlowe for the design as well as the help from all of my other friends.  I’d love to link to your site if you have one, but he’s the only one for now.

The site was built using both WordPress (for the blog) and BBpress (for the forum software) along with jQuery!  The site also validates at XHTML strict 1.0. In future posts, I will get more into the specifics of how the site was built and some of the challenges involved.