773 snippets from 1582 members, and growing!
|
login
|
join
about
bytebin
members
tags
snippets
join
Snippets
Submit a Snippet
Search Snippets
New Snippets
Top Snippets
Top Tags
PHP
(137)
JavaScript
(125)
Java
(66)
VBSCRIPT
(58)
String
(44)
CSS
(31)
CSharp
(28)
File
(28)
HTML
(27)
mysql
(25)
C
(24)
VB.NET
(24)
python
(24)
CPlusPlus
(23)
groovy
(23)
New Snippets
PHP/MySQL impleme...
Analyte - Easy to...
Easy SQLite inter...
Very lightweight ...
AutoComplete plug...
AutoComplete plug...
Connection Java -...
View PostgreSql
Store Procedure
Pygame - Simple p...
Venture Capital Jobs
New Members
me
jamesmcm
Can
Kelmi
ysg
dannymo2
chorny
wallie
Hackdemian
impomatic
Top Members
dannyboy
sundaramkumar
mattrmiller
Pio
i_kenneth
ASmith
ctiggerf
sehrgut
bertheymans
SCoon
Home
/
Snippets
/
Auto Create New Element
/
Comments
Auto Create New Element
Snippet Menu
Revisions
Comments
Related Snippets
Add to Favorites
Email Snippet
Download Snippet
Print Snippet
Blog Snippet
snippet
|
revisions
|
comments
|
related
|
Add to Favorites
|
email
download
|
print
|
blog it
New Comment
Example of use
Mon. Jun. 4th, 2007 2:49 PM
Fordiman
Quick example showing how to make a table with event handling
acne
(
'table'
,
{
cellspacing:
0
,cellpadding:
0
}
,
{
}
,
{
}
,
[
acne
(
'tbody'
,
{
}
,
{
}
,
{
}
,
[
acne
(
'tr'
,
{
className:
'header'
}
,
{
}
,
{
}
,
[
acne
(
'td'
,
{
className:
'id'
,innerHTML:
'ID'
}
,
{
}
,
{
click:toggleSort
}
)
,
acne
(
'td'
,
{
className:
'name'
,innerHTML:
'Name'
}
,
{
}
,
{
click:toggleSort
}
)
]
)
,
acne
(
'tr'
,
{
className:
'even'
}
,
{
}
,
{
}
,
[
acne
(
'td'
,
{
innerHTML:
'0'
}
)
,
acne
(
'td'
,
{
innerHTML:
'Fordi'
}
)
]
)
,
acne
(
'tr'
,
{
className:
'odd'
}
,
{
}
,
{
}
,
[
acne
(
'td'
,
{
innerHTML:
'1'
}
)
,
acne
(
'td'
,
{
innerHTML:
'Dave'
}
)
]
)
,
acne
(
'tr'
,
{
className:
'even'
}
,
{
}
,
{
}
,
[
acne
(
'td'
,
{
innerHTML:
'2'
}
)
,
acne
(
'td'
,
{
innerHTML:
'Jim'
}
)
]
)
]
)
//End of tbody
]
,document.
body
)
;
//end of table; last argument is parent here.
Reply
New Comment
acne('table',{cellspacing:0,cellpadding:0},{},{},[
acne('tbody',{},{},{},[
acne('tr',{className:'header'},{},{},[
acne('td',{className:'id',innerHTML:'ID'},{},{click:toggleSort}),
acne('td',{className:'name',innerHTML:'Name'},{},{click:toggleSort})
]),
acne('tr',{className:'even'},{},{},[
acne('td',{innerHTML:'0'}),
acne('td',{innerHTML:'Fordi'})
]),
acne('tr',{className:'odd'},{},{},[
acne('td',{innerHTML:'1'}),
acne('td',{innerHTML:'Dave'})
]),
acne('tr',{className:'even'},{},{},[
acne('td',{innerHTML:'2'}),
acne('td',{innerHTML:'Jim'})
])
]) //End of tbody
],document.body); //end of table; last argument is parent here.