rendered paste body<script>
// same as document ready, but shorter
$(function() {
$('#add_attribute').click( function() {
// where does attributes come from?
var str = '<label style="color: #000000;font-size: 10px;font-weight: bold;">Name: </label><input type="text" name="attr_name[' + attributes + ']" size="15" value="" /> ';
str += '<label style="color: #000000;font-size: 10px;font-weight: bold;">Value: </label><input type="text" name="attr_value[' + attributes + ']" size="25" value="" /> <a href="#" class="kill_attribute" style="font-weight: bold;text-decoration: none;padding-left: 3px;padding-right: 3px; border: 1px solid white;background-color: red;color: white;" ref="' + attributes + '">X</a>';
$('<div class="attr_box" id="attr_num[' + attributes + ']">' + str + '</div>').appendTo('#attributes');
// find a element with class kill_attributes
$('a.kill_attribute').click( function() {
alert('me');
});
});
});
</script>
<div id="attributes">
<p>
<a id="add_attribute" href="#"><b class="link_option">Add an attribute</b></a> |
<a id="add_seperator" href="#"><b class="link_option">Add a seperator</b></a> |
<a id="clear_attributes" href="#"><b class="link_option">Clear Attributes</b></a> <br />
<small>ex: address, price, age limit, </small>
</p>
<noscript><!-- usually dynamic javascript content --></noscript>
</div>