Hailwood Hailwood - 5 months ago 20
jQuery Question

jQuery autocomplete : move list position?

I am wondering if it is possible for me to move the dropdown list down 4px?

I have tried several styles in

.ui-autocomplete {}
.

including:

margin-top: 4px;


top: 4px


but it does not seem to be working?

Answer

This is what the offset property of the position option is for:

$('#myField').autocomplete({
    source: …,
    position: {
        offset: '0 4' // Shift 0px left, 4px down.
    }
});
Comments