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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

javascript - Image onload event not firing in firefox -