I am trying to understand someone else’s codes…he has the following:
var positionAt = horizontalPosition + ' ' + verticalPosition;
var positionOffset = String(horizontalOffset + ' ' + verticalOffset);
//i don't understand the codes below. I don't think Jquery position method support at and of attribues....
$tooltipElement.position({at: positionAt, of: $element, my: 'left top', offset: positionOffset});
$element.hover(function(){
$instance = $(this).css({'cursor': 'pointer'});
$('#tooltip-' + $instance.attr('id') ).fadeIn('fast');
}, function(){
$instance = $(this).css({'cursor': 'auto'});
$('#tooltip-' + $instance.attr('id') ).fadeOut('fast');
});
I am not sure what the position method with At, of and my attributes for. Can anyone help me about it? Thanks a lot.
He’s using the UI/Position plugin, in which the position function takes
my,atandofparameters :