I have the following code fragment that does not work, can anybody help please.
This fragment is accessed from another HTML page that includes all the necessary JQuery libraries.
<link rel="stylesheet" type="text/css" href="/fedora-ui/menu/search.css" media="screen" />
<link rel="stylesheet" type="text/css" media="screen" href="/fedora-ui/menu/ui.jqgrid.css" />
<script src="/jquery/jqGrid/js/ui.multiselect.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#selectable").buttonset();
$("#radio").buttonset();
$("button").button();
$("#add").click(function() {
$("#field-selection").after($('#radio-new'));
});
$("p").click(function () {
$(this).slideUp();
});
});
</script>
<div>
<div id="simple_search">
<h3>Advanced Search</h3>
<div>
<p>Enter one or more search terms in the box below and select the fields you wish to search over</p>
</div>
<button id="add">ADD</button>
<div id="field-selection">
<form method="post" class="form" id="form1">
<div>
<input class="text" id="search1" type="text" value="Search the archive..." />
<input id="send1" type="submit" value="Search" />
</div>
</form>
<div id="selectable">
<input class="search_button" type="checkbox" id="check1" /><label for="check1">Project</label>
<input class="search_button" type="checkbox" id="check2" /><label for="check2">Case ID</label>
<input class="search_button" type="checkbox" id="check3" /><label for="check3">Fieldwork Date</label>
<input class="search_button" type="checkbox" id="check4" /><label for="check4">Fieldworker ID</label>
<input class="search_button" type="checkbox" id="check5" /><label for="check5">Age</label>
<input class="search_button" type="checkbox" id="check6" /><label for="check6">Gender</label>
<input class="search_button" type="checkbox" id="check7" /><label for="check7">Data Type</label>
<input class="search_button" type="checkbox" id="check8" /><label for="check8">Keyword</label>
<input class="search_button" type="checkbox" id="check9" /><label for="check9">Description</label>
<input class="search_button" type="checkbox" id="check10" /><label for="check10">Title</label>
<!--<input class="search_button" type="checkbox" id="check11" /><label for="check11">Full Text</label>-->
</div>
<div id="radio">
<input class="search_button" type="radio" id="radio1" name="radio"/><label for="radio1">Project</label>
<input class="search_button" type="radio" id="radio2" name="radio" /><label for="radio2">Case ID</label>
<input class="search_button" type="radio" id="radio3" name="radio" /><label for="radio3">Fieldwork Date</label>
<input class="search_button" type="radio" id="radio4" name="radio" /><label for="radio4">Fieldworker ID</label>
<input class="search_button" type="radio" id="radio5" name="radio" /><label for="radio5">Age</label>
<input class="search_button" type="radio" id="radio6" name="radio" /><label for="radio6">Gender</label>
<input class="search_button" type="radio" id="radio7" name="radio" /><label for="radio7">Data Type</label>
<input class="search_button" type="radio" id="radio8" name="radio" /><label for="radio8">Keyword</label>
<input class="search_button" type="radio" id="radio9" name="radio" /><label for="radio9">Description</label>
<input class="search_button" type="radio" id="radio10" name="radio"/><label for="radio10">Title</label>
<!--<input class="search_button" type="radio" id="radio11" /><label for="radio11">Full Text</label>-->
</div>
</div>
</div><!-- End demo -->
</div>
</div>
<div id="radio-new" style="display: none">
<input class="search_button" type="radio" id="radio-new1" name="radio"/><label for="radio-new1">Project</label>
<input class="search_button" type="radio" id="radio-new2" name="radio" /><label for="radio-new2">Case ID</label>
<input class="search_button" type="radio" id="radio-new3" name="radio" /><label for="radio-new3">Fieldwork Date</label>
<input class="search_button" type="radio" id="radio-new4" name="radio" /><label for="radio-new4">Fieldworker ID</label>
<input class="search_button" type="radio" id="radio-new5" name="radio" /><label for="radio-new5">Age</label>
<input class="search_button" type="radio" id="radio-new6" name="radio" /><label for="radio-new6">Gender</label>
<input class="search_button" type="radio" id="radio-new7" name="radio" /><label for="radio-new7">Data Type</label>
<input class="search_button" type="radio" id="radio-new8" name="radio" /><label for="radio-new8">Keyword</label>
<input class="search_button" type="radio" id="radio-new9" name="radio" /><label for="radio-new9">Description</label>
<input class="search_button" type="radio" id="radio-new10" name="radio"/><label for="radio-new10">Title</label>
<input class="search_button" type="radio" id="radio-new11" /><label for="radio-new11">Full Text</label>
</div>