I want to use jQuery UI’s position utility to center a number of elements with the same class inside of their respective parent elements. Here’s what I came up with:
$(".elementclass").position({
"my": "center center",
"at": "center center",
"of": $(this).parent()
});
Unfortunately, this does not work, since the jQuery object $(this) somehow does not refer to the positioned element in this context. How can I pull this off?
How about this: