Saturday, October 21, 2006

Plugin updates

I rewrote the mp3player plugin and changed the page. The code is no longer a download. You can copy and paste it from the page. The code is much cleaner now.

I made some small changes in the texrep plugin. Check the updates for more information.
There are still some bugs left but i'm working on them.

Sunday, October 15, 2006

New jquery plugin : texrep

I worked on a new jquery plugin: texrep. It's short for textreplacement. It's just a funny name.

Texrep replaces a text with an image using a font file.

You can find the code and examples at http://dlinck.d.googlepages.com/jquerytexrep.

Tuesday, October 10, 2006

jquery mp3player update

I moved the player code to my jquery googlepage

I added more options like playing a file on startup and choice of flashplayer insertion.

I will set up som examples tomorrow.

Monday, October 09, 2006

Structured css file

There is a lot to find about how to structure your css files but you have to find the best method for yourself.

With comments you can't go wrong. I use them like this

/*------------ generic --------*/

/*------------ div -----------*/

/*------------ span -----------*/

/*------------ title -----------*/

/*------------ paragraph -----------*/

/*------------ link -----------*/

/*------------ list -----------*/

/*------------ image -----------*/

/*------------ form -----------*/

/*------------ table -----------*/

This way you can find the css style by the function of the html tag and still add extra comment. To make it more readable I add the tag in front of the id or class selector when i have to use a parent element.

/*------------ div -----------*/
#content
    { width: 80%; }
#navigation
    { width: 20%; }
/*------------ link -----------*/
div#content a, div#navigation a
    { text-decoration: none; }
div#navigation a
    { font-weight:bold; }

The following advise you can see in the previous example. by indenting the actual style and putting it on one line you have a visual guidance and a compact css file. An additional advantage of seperating the selectors from the style is that you can have a line of selectors where the style is fully visible underneath. Of course you must be aware not to use to many selectors. In the example the first link selector can be

/*------------ link -----------*/
a
    { text-decoration: none; }


This works for me but different methods aren't wrong.