Well, it seems the biggest problem is that the "flip fit" is not really a valid value for collision . (I think this is considered "flip" .) You are probably looking for "flipfit" (without a space) or maybe just "fit" . You also need to make sure that you align the right side of the popup on the left side li - left alignment, left alignment - then overlap and then flipped because there was not enough space. I changed your code and improved its work (but still not quite, you have to configure it).
$('.capbIpadPopupAutoComplete').position({ "my": "right top" , // Horizontal then vertical, missing values default to center "at": "left top", // Horizontal then vertical, missing values default to center "of": $('.capbStrategicPlan'), // Element to position against // "offset": "20 30" , // Pixel values for offset, Horizontal then vertical, negative values OK "collision": "fit" // What to do in case of });
$(this) didn't seem to work in the of argument, so I replaced it.
You also do not need to set the right value for the popup, since .position sets left , and setting both compresses the popup.
As for the arrow, why don't you just put them separately? If the popup needs to move a bit, it will overlap the arrow, but that will simply reduce the arrow.
source share