dima-kruglyak,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
function rev(sel, text) {
return $(sel).map(function(i) {
return text ? $(this).text(text[i] || "") : $(this).text()
}).get()
};
var myAnchorText = rev(".myAnchor");
$("ul").on("click mouseenter mouseleave", ".showEdt", function(event) {
var text = $(this).data("evalz");
if(!text || !text.length) return;
if (event.type == "mouseenter") rev(".myAnchor",text);
else if (event.type == "click") myAnchorText = text;
else rev(".myAnchor",myAnchorText);
})
});
</script>
</head>
<body>
<ul>
<li class="showEdt" >No</li>
<li class="showEdt" data-evalz="[]">No</li>
<li class="showEdt" data-evalz="[111,1]">Milk</li>
<li class="showEdt" data-evalz="[222]">Bread</li>
<li class="showEdt" data-evalz='[null,"test"]'>test</li>
</ul>
<div class="myAnchor">333</div>
<div class="myAnchor">222</div>
</body>
</html>