Skip navigation

Tag Archives: jquery

1
2
3
4
5
$('input').focus(function(){
    this.select();
});

[UPDATED to allow multiple instances]
[UPDATED bug fix]

Hello everyone. The select tag that comes with html is pretty useful, but once in a while, one of your clients complains that it’s fugly. So you need to makeĀ  a custom one. And that’s what i just did. Damned clients!

Requirements:

  • jquery

To do this you need to create a file called customSelect.ctp in your app/views/elements folder(Of course you don’t NEED cakephp to use this.).

And the content said file would be(This example is for a category select menu.):
Read More »

Game of life in javascript/jquery flavor.
Rules:
  • For a space that is ‘populated’:
    • Each cell with one or no neighbors dies, as if by loneliness.
    • Each cell with four or more neighbors dies, as if by overpopulation.
    • Each cell with two or three neighbors survives.
  • For a space that is ‘empty’ or ‘unpopulated’
    • Each cell with three neighbors becomes populated.

Notes:

  • runs much faster in Chrome.
  • broken and runs like crap in all versions of ie
place holder
Round: