Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

YAWEI SONG
9,168 Pointsin jquery ui, .dialog() property "position" doesn't work. Who can help me?
I learned jquery ui by myself, I want to customize my alert window using the .dialog() method. But the "position" property doesn't work. The alert window always stays at the left top corner. How to set the value of position?
$('#hello').dialog({ width: 300, height: 300, modal: true, position:"right bottom", show:"slideDown", hide:{ effect: 'explode', delay: 250, duration: 1000, easing: 'easeInQuad' } });
1 Answer

Lucas Santos
19,315 PointsThat's because the position property does not take a String it takes in another Object with the key of at like this.
$('#hello').dialog({
width: 300,
height: 300,
modal: true,
position: { at: "right bottom" },
show:"slideDown",
hide:{ effect: 'explode', delay: 250, duration: 1000, easing: 'easeInQuad' }
});
YAWEI SONG
9,168 PointsYAWEI SONG
9,168 PointsThank you, Lucas! It works!