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.
- jQuery(function($) {
- var menuHeight = $('.dynamic-menu').height();
- var offSet = $('.content').offset().top;
- var distance = (offSet + menuHeight)
-
- $('<span id="fixit"></span>').insert(distance);
- });