Notes by James
Displaying keyword search results 1 - 8
Created by James on January 26, 2012 21:23:56
Last update: January 26, 2012 21:23:56
In an HTML page, elements can overlap because of position styles. When there's an overlap, elements coming later in the HTML code are displayed on the top. This can be altered by specifying z-index in the CSS. Elements with higher z-index are placed on the top.
However , z-index only works for elements that are not static positioned. Static positioned elements are always at the bottom compared to relative , fixed and absolute positioned elements.
This is a test page:
<!DOCTYPE html>
<html>
<head>
<style t...
Effects of z-index can be tested by adding it to the elements, for example:
<div id="bg" class="big" style="z-index: 3"></div>...
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 October 29, 2010 20:12:28
Last update: October 29, 2010 20:14:17
Some links for layout managers (the widgets that divide your screen into sections with movable separators, like those normally found in IDEs):
YUI 2: Layout Manager
jQuery UI.Layout Plug-in
Also: http://plugins.jquery.com/project/Layout
jLayout — jQuery plugin
Layout manager - Scripteka :: Prototype extensions library .
Demos: http://javascripts.sourceforge.net/html/layoutmanager/layoutmanager-index.html
Created by James on October 12, 2010 16:17:05
Last update: October 12, 2010 16:18:31
The splice method cuts elements from an array, and returns the cut-off elements as a new array.
a = [1, 2, 3, 4, 5, 6, 7];
b = a.splice(1, ...
Created by James on September 10, 2010 23:01:14
Last update: September 10, 2010 23:01:14
By default, heights for jQuery UI tab panels expand or contract depending on the height of each tab. The code snippet here sets the height of all tabs to be equal to that of the container.
<!DOCTYPE html>
<html>
<head>
<title>jQu...
Created by James on June 22, 2010 19:09:07
Last update: June 22, 2010 19:09:50
The first form iterates over a jQuery object and executes a function for each matched element. This is an example from jQuery documentation:
<!DOCTYPE html>
<html>
<head>
<style>
...
The second form iterates over a general collection (examples from jQuery documentation):
$.each([52, 97], function(index, value) {
al...
Created by James on August 10, 2009 04:02:25
Last update: August 10, 2009 04:16:31
Function Description Examples
length This is actually a property. 'abcd'.length == 4
charAt(int) Return character at given index 'abcd'.charAt(2) == 'c'
(index starts from 0)
indexOf(string) Return first index of given string 'abcdcdcd'.indexOf('cd') == 2
lastIndexOf(string) Return last index of given string 'abcdcdcd'.lastIndexOf('cd') == 6
substring(beginIndex, endIndex) Return substring starting from beginIndex and ending at endIndex 'abcdcdcd'.substring(1, 3) == 'bc'
'abcdcdcd'.substring(1, 300) == 'bcdcdcd'
split(string) Split string into array of strings using given string as delimiter '/home/jsmith/download/js/'.split('/')
==
['', 'home', 'jsmith', 'download', 'js', '']
toLowerCase() Convert string to lower case 'AbCd'.toLowerCase() == 'abcd'
toUpperCase() Convert string to upper case 'AbCd'.toUpperCase() == 'ABCD'
Created by James on March 27, 2009 03:30:11
Last update: March 27, 2009 03:30:11
You need to use drop index to drop a unique constraint on a MySQL table:
alter table mytable drop index uk_the_unique_key_n...