pop up hover

HTML

<div class="icons" data-code="CR9.1">Test</div>

<!-- HIDDEN / POP-UP DIV -->
    <div id="pop-up">
      <h3 id="curCode">Curr Code</h3>
      <p id="curDes">
        description
      </p>
    </div>

CSS

/* HOVER STYLES */
div#pop-up {
  display: none;
  position: absolute;
  width: 280px;
  padding: 10px;
  background: #eeeeee;
  color: #000000;
  border-radius: 25px;
  border: 1px solid #ffc90e;
  font-size: 90%;
}

JavaScript

var moveLeft = 20;
var moveDown = 10;

  $('.icons').hover(function(e) {
      var curID = $(this).data("code")
      var inner = lookUp(curID)
      
      $("#curDes").html(inner)
      $("#curCode").html(curID)
    $('#pop-up').show()
    
      
  }, function() {
    $('#pop-up').hide();
  });

 $('.icons').mousemove(function(e) {
    $("div#pop-up").css('top', e.pageY + moveDown).css('left', e.pageX + moveLeft);
  });



var curCodes = {
  "CR9.1": {
    "Mastery": 1,
    "Charisma": 4,
    "Clarity of Mind": 3,
    "Outcome": "View, listen to, read, comprehend, and respond to a variety of texts that address identity (e.g., The Search for Self), social responsibility (e.g., Our Shared Narratives), and efficacy (e.g., Doing the Right Thing).",
    "Benefits": "Understanding written and oral texts ..."
  },
  "CR9.2": {
    "Mastery": 1,
    "Charisma": 4,
    "Clarity of Mind": 3,
    "Outcome": "Select and use appropriate strategies to construct meaning before (e.g., formulating focus questions), during (e.g., adjusting rate to the specific purpose and difficulty of the text), and after (e.g., analyzing and evaluating) viewing, listening, and reading.",
    "Benefits": "Understanding written and oral texts ..."
  }
}
//lookup array
function lookUp(curID) {
   var ret = ""
   $.each(curCodes, function(i, v) {
        if (i == curID) {
        var outcome = v.Outcome
        var ben = v.Benefits
        ret = "<p>"+outcome+"</p><p>"+ben+"</p>"
        }
     
});
return ret
    
}