javascript - bootstrap popover positioning - not working -
i have login , register link user can click , gets popover opened login. want popover bit shifted left hangs this:
i on 15' screen laptop, far fine. if open in bigger resolution, looks this:
i setting in js this:
$('#profilepover').on('shown.bs.popover', function(){ $('.popover').css('left','774px'); });
how can make stick login link no matter how big screen is?
instead of left
use right
:
$('#profilepover').on('shown.bs.popover', function(){ $('.popover').css({right: '115px', left: 'auto'}); });
right position not change window resize. of course 115px
example, adjust actual layout. need reset left position auto
in case because default popover left 0.
Comments
Post a Comment