jquery - Align two elements -
i have following on plugin:
$(this).mouseenter(function (e) { var = $(this); var text = "<div class="text">" + options.text + "</div>" $("body").append(text); })
how align "text" "this" before adding body on following positions: topcenter, bottomcenter, rightmiddle or leftmiddle.
thank you!
$(this).on('mouseenter', function() { var $this = $(this), text = $('<div />', {'class': 'text', text : options.text, style : 'position : relative; margin : 0 auto; text-align : center;' } ); $("body").append(text); }):
Comments
Post a Comment