Insert new content in container div

Insert new content in container div

How could I insert html content into a container div - and insert this content at a specific height (px) from the opening tag of the container? - I'm quite stuck on this one and need a solution.

offset() could be useful except it measures down from the top of the document, not from the content div container. any way to apply offset() to a container like .content below.

  1. jQuery(function($) {
  2.     var menuHeight = $('.dynamic-menu').height();
  3.     var offSet = $('.content').offset().top;
  4.     var distance = (offSet + menuHeight)
  5.     
  6.     $('<span id="fixit"></span>').insert(distance);
  7. });