jQuery-Impromptu
jQuery-Impromptu copied to clipboard
Getting tooltip dimensions in "position" function
Hi, I want to make automatic tooltips positioning without passwing "x" and "y" parameters and I have problem with getting dimensions of the actual notification box. I am trying to get dimensions of the notification box in the "position" function, but I can't get dimensions for the actual box, I am always getting dimensions for the last created box. I have tried that, but without success:
position: function() {
console.log($.prompt.getCurrentStateName());
console.log($.prompt.getCurrentState().width());
console.log($.prompt.getCurrentState().prev().width());
console.log($.prompt.getCurrentState().next().width());
console.log($.prompt.getState($.prompt.getCurrentStateName()).width());
}
Is there any way to get these dimensions without rewriting your code?