JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo jQuery Bug #9222</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="wrapper">
<div id="tickets">
<table id="tickets_table">
<tr>
<th>FOO</th>
<th>BAR</th>
</tr>
<tr><td>foo</td><td>bar</td></tr>
</table>
</div>
<div class="additional_buttons">
<div class="show_more">more</div>
</div>
</div>
</body>
</html>
CSS
body {
background: none repeat scroll 0 0 #ABB3EF;
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
color: #505362;
padding: 0;
margin: 0;
}
a {
text-decoration: none;
color: #06C;
}
a:hover {
text-decoration: underline;
}
#wrapper {
background: none repeat scroll 0 0 #C7CFF4;
padding: 15px;
margin: 25px;
border: 1px solid #fff;
}
#tickets {
margin: 15px 0 0 0;
}
#tickets_table {
border: 1px solid #fff;
border-collapse: collapse;
}
#tickets_table th {
background-color: #ABB3EF;
font-weight: bold;
color: #000;
}
#tickets_table td, #tickets_table th {
border: 1px solid #fff;
padding: 5px;
}
#tickets_table td {
white-space: wrap;
word-wrap: break-word;
max-width: 350px;
text-align: center;
}
.show_more {
text-align: right;
padding: 5px;
color: #06C;
}
.show_more:hover {
cursor: pointer;
text-decoration: underline;
}
.additional_tickets {
filter: alpha(opacity=0);
-moz-opacity: 0;
-webkit-opacity: 0;
opacity: 0;
}
JavaScript
/*****************************************************************************************************
*
* init
*
*****************************************************************************************************/
// Reaktion auf ready-Event
$(document).ready(function() {
initial_load();
});
/*****************************************************************************************************
*
* global EventListener
*
*****************************************************************************************************/
// "more" button click-event
$('.show_more').live('click', function() {
get_next_tickets();
});
/*****************************************************************************************************
*
* Initial Load
*
*****************************************************************************************************/
function initial_load()
{
$('#tickets_table tr:not(:first-child):even').css('background-color', '#fff');
$('#tickets_table tr:not(:first-child):odd').css('background-color', '#eee');
}
/*****************************************************************************************************
*
* Get Next Tickets
*
*****************************************************************************************************/
function get_next_tickets()
{
$('#tickets_table').append('<tr class="additional_tickets"><td>foo</td><td>bar</td></tr>');
$('#tickets_table tr:not(:first-child):even').css('background-color', '#fff');
$('#tickets_table tr:not(:first-child):odd').css('background-color', '#eee');
$('.additional_tickets').animate({opacity: 1}, {duration: 1000});
}