Archives for Friday, November 23rd, 2007

You are currently browsing 2 article(s) published on Friday, November 23rd, 2007, please try the search if you can't fint what you're looking for.


Opera Mini Better CSS-support than Opera?

Friday, November 23, 2007

I was checking my site in the Opera Mini 4 Simulator and noticed that Opera Mini has support for the :last-child pseudo class. Something that Opera (9.24) still does not have.

Opera Mini 4 Supports :last-child Opera 9.24 Does not Support :last-child

TF?

  • Comments are off
  • Filed under CSS, Other

jQuery Color Picker Plug-In

Friday, November 23, 2007

A simple colour-picker plug-in for jQuery. Use it like this: $('select[name="colour"]').colourPicker();

Where the XHTML looks like this:

<form method="post" action="">
    <p>
        <label>Select a Colour<br />
            <select name="colour">
                <option value="ff0000">Red</option>
                <option value="00ff00">Green</option>
                <option value="0000ff">Blue</option>
            </select>
        </label>
    </p>
</form>

And the colourPicker plug-in will turn the select in to a normal input[type="text"] and add a colour-picker icon to the right of it. Clicking the icon will bring up a dialog box allowing you to select any of the colours that were present in the select-element.

You can check it out in action here.

It requires jQuery and you can get the code here. The default styling of the colour-picker can be found here but it's very easy to apply your own styling using the default as a guide.

And as a bonus, here's a little PHP-function that will generate a list of "web-safe" colours:

<?php
function gwsc() {
        
$cs = array('00''33''66''99''CC''FF');

        for(
$i=0$i<6$i++) {
                for(
$j=0$j<6$j++) {
                        for(
$k=0$k<6$k++) {
                                
$c $cs[$i] .$cs[$j] .$cs[$k];
                                echo 
"<option value="$c">#$c</option>n";
                        }
                }
        }
}
?>

Use it like this:

<select name="colour">
<?php gwsc(); ?>
</select>

Enjoy, and do leave some feedback.



Post It

From June 02 to April 23

  1. Mogrify is what you're looking for if you want to convert multiple images to multiple other images in ImageMagick
  2. Tommorrow, finally, the inFamous demo will be friggin availble on PSN!! Suweeeeeeeeet
  3. Fuck canvas is cool, I've started playing around with old 3D-shit again :)

November 2007

S M T W T F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30


Recent Comments

  1. buy thesis on A Modular Design Pattern:
    Choosing buy dissertation service a...
  2. research papers on A Modular Design Pattern:
    Want to find cheap literature essay...
  3. professional resume service on A Modular Design Pattern:
    Yeah doubtless very constructive f...
  4. website submission service on A Modular Design Pattern:
    Are willing to get Search engine op...

Style Switcher

The style switcher allows you to change the look and feel of exscale.se.
Only CSS and JavaScript are changed. The XHTML stays the same.

For more information about the styles, check the styles page.


Categories


Random Quote

Kommer alla vara där eller kommer tex Scott vara hemma? - Boode


Random Images




Answer This!

Do you find the "scroll-pagination" annoying? (If you don't know what it is, scroll to the bottom of the first-page)


Blog Roll