I have added some code using prepend as you can see. Each of these items (the table cells) has a class called "predicate". When the user hovers over these I want to replace "predicate" with "predicate-over". I thought I had what I need below but it doesn't seem to work.
<script>
$(document).ready(function() {
$("#leo-smart").hover(
function() { $("#007").prepend("<img src='images/hand.gif' width='22' height='27' id='just-added' />"); },
function() { $("#just-added").remove(); }
);
$("#007").hover(
function() { $("#007").prepend("<a href='object.html' border='0'><img src='images/hand.gif' width='22' height='27' id='just-added' alt='View this object' /> </a>"); },
function() { $("#just-added").$("#007").prepend("<img src='images/hand.gif' width='22' height='27' id='just-added' alt='View this object' />"); }
);
$("#leo-smart").click(
function() { $("#more-options").prepend("<table><tr><td><div class='predicate'>is a</div></td></tr><tr><td><div class='predicate'>has famous work</div> </td></tr><tr><td><div class='predicate'>has city (lived in)</div></td></tr><tr><td><div class='predicate'>has patron</div></td></tr><tr><td><div class='predicate'>has birthdate</div></td><tr><td><div class='predicate'>has birthcity</div></td></tr><tr><td><div class='predicate'>has nationality</div></td></tr></table>"); }
);
$(".predicate").hover(
function() { $(this).addClass("predicate-over"); },
function() { $(this).removeClass("predicate-over"); }
);
});