Recent Notes

Displaying keyword search results 1 - 10
Created by James on September 20, 2012 15:08:15    Last update: September 21, 2012 11:55:58
The idea is simple: duplicate the input field and position one on top of the other. The top one will take the input, while the bottom one will serve the placeholder. The top one will have a transparent background so the value of the placeholder field will show through. The placeholder field is disabled so that it's value is not submitted with the form. Here's the code: (function($) { $.fn.placeholder = function(... But in practice, it's tricky. Notice that I used 'background-color': 'rgba(255, 255, 255, 0)' for the background transparency. This is because 'background-color': 'transparent' does not work for IE9. Even though the input is on top of the placeholder, the placeholder always gets the event when you click on the field. That might be...
Created by James on September 20, 2012 10:22:58    Last update: September 20, 2012 10:22:58
This is a simple jQuery placeholder plugin that can be used on both text and password fields. I've been using the Mathias Bynens plugin for a while and it has been quite useful. I decided to create my own plugin because of two problems: The interaction between the Mathias Bynens plugin and jQuery validation can be quite intricate. Placeholder text is lost once the input field gets focus. This can be a problem when I want to auto-focus on a field, say user id on a log in form. I must mention that although it worked for me, this plugin has not been thoroughly tested. Feel free to provide feedback if you see problems. (function($) { $.fn.placeholder = function(... Since it uses absolute positioning, you...
Created by Captain on November 22, 2010 04:34:37    Last update: July 22, 2012 20:36:26
HDTV modeline example: 1920x1080 148.5 1920 2008 2052 2200 1080 1084 1088... MythTV modeline database: http://www.mythtv.org/wiki/Modeline_Database <!DOCTYPE html> <html> <head> <style ... Reference: Custom Resolutions on Intel Graphics
Created by magnum on September 11, 2011 19:46:09    Last update: September 11, 2011 19:46:09
A pair of C functions convert between an Internet address and a string (ASCII): #include <arpa/inet.h> /* * Returns a poin... However , these functions do not support IPv6. The new pair is: #include <arpa/inet.h> /* Convert a Internet ad... Examples: #include <sys/socket.h> #include <netinet/in.h>...
Created by jinx on April 10, 2011 14:14:29    Last update: April 10, 2011 14:14:46
The count function can be used to get the length of a PHP array. In PHP, there's no difference between an array with integer indexes and a map with string keys. Strings and integers are used interchangeably, '100' and 100 are the same when used as keys to an (associative) array. sizeof is an alias of count . <?php $a[100] = '100'; echo "Length of \$a: ... Outputs: Length of $a: 1 Length of $a: 2 Length of $a...
Created by James on March 29, 2011 11:37:53    Last update: March 29, 2011 11:37:53
The test page below reports the column and row indexes of the table cell you clicked. <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on March 29, 2011 11:28:33    Last update: March 29, 2011 11:30:12
The test page below shows how to count the number of columns for a given table row with jQuery: $('table tr:eq('+row+') td').length <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on March 29, 2011 11:25:35    Last update: March 29, 2011 11:25:35
With jQuery, it is pretty easy to access a table cell: just use the $('table tr:eq('+row+') td:eq('+column+')') selector. Below is a test page: <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on March 13, 2011 13:44:37    Last update: March 21, 2011 11:30:55
This is a jQuery input control that lets you enter any number of input rows of name and value pairs. <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on October 11, 2010 19:01:28    Last update: January 11, 2011 20:38:56
Test page (click the "new window" icon to see the transition): <!DOCTYPE html> <html> <head> <title>jQu...
Previous  1 2 Next