Skip to content Skip to sidebar Skip to footer

Jquery Bpopup Position Popup To My #class

i asked this similar question before about positioning my jquery bpopup below my link and someone gave me an answer to which it will show the popup where my mouse cursor clicks..th

Solution 1:

you can get your link's position with the jQuery#offset method

$('.notsbutton').on('click', function(e) {
  e.preventDefault();

  console.log({
    x: $(this).offset().left,
    y: $(this).offset().top + $(this).height()
  });
});

NOTE that you might gonna need to specify display: inline-block for your A links in order to make the sizes and positioning work correctly in different browsers


Post a Comment for "Jquery Bpopup Position Popup To My #class"