Notes by James
Displaying keyword search results 1 - 10
Created by James on January 27, 2012 12:38:53
Last update: January 27, 2012 12:39:46
A brief summary of jQuery DOM manipulation methods for reference.
.before() and .insertBefore() : insert content before target element - as sibling.
Examples:
// insert summary before details
$('#detail').b...
.after() and .insertAfter() : insert content after target element - as sibling.
Examples:
// insert details after summary
$('#summary').a...
.prepend() and .prependTo() : insert content as first child of target element.
Examples:
// prepend caption to table
$('table').prepend(...
.append() and .appendTo() : insert content as last child of target element.
Examples:
// append row to table
$('table').append('<tr><...
Created by James on March 27, 2009 03:20:58
Last update: May 08, 2011 12:32:31
Use show create table <tablename> :
mysql> show create table my_test_table;
+------...
Select from information_schema.table_constraints and information_schema.key_column_usage
mysql> select * from information_schema.table_cons...
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:34:53
Last update: March 29, 2011 11:34:53
The width() function returns the width of an element. The test page below shows how to retrieve widths for table cells. The row parameter can be omitted if columns in all rows are of same width.
<!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 March 11, 2011 09:28:31
Last update: March 11, 2011 09:28:31
To delegate an event to all but the first child, the selector :not(:first) does not work, but :gt(0) works.
<!DOCTYPE html>
<html>
<head>
<title>jQu...
Created by James on March 11, 2011 09:03:21
Last update: March 11, 2011 09:03:21
Use the :first selector to delegate an event to the first element of a selection.
<!DOCTYPE html>
<html>
<head>
<title>jQu...
Created by James on March 29, 2010 03:11:38
Last update: January 11, 2011 20:19:39
This is an age old problem. Since it comes up time and time again, I'm writing this down for future reference. Let's start with a two-column layout generated by the 2 Column Layout Generator :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans... It renders like this: The left column is shorter than the right column. How to make the left and right column the same height? Adding height: 100% to the style sheet of the left column doesn't cut it. There are several hacks, none of them are straightforward: In search of the One True Layout Faux Columns Creating Liquid Layouts with Negative Margins In short, there's no instruction in CSS that tells a DIV that its height should be 100% of that of the...