Hi,
I'm using a clone helper for my sortable list, and it's working great
except that I am applying a style to the helper so that the helper
element is a smaller size than the original item element. So, for
example, the item in the list is 100x100px, and the helper is 50x50px.
The problem becomes noticeable when I apply a containment. For some
reason the helper's proportions do not change to 50x50px, and remain
100x100px, causing the edge of the helper to hit the containment
boundary incorrectly.
Is there a way to refresh the helper's proportions? I noticed in the
code it is cacheing it. How can I call this function from outside of
the library?
Here is my code:
$(function() {
$('.sort_block').sortable({
connectWith: ['.sort_block'],
helper: 'clone',
appendTo: 'body',
opacity: .5,
tolerance: 'pointer',
cursorAt: {top:25,left:24},
scroll: false,
update: function(e,
ui){$(ui.item).css({width:"",height:""});},
containment: $('#body_body'),
start: function(e, ui)
{$(ui.helper).height(50);$(ui.helper).width
(50); $(ui.helper).css({width:"50px",height:"50px"}).addClass
("sort_helper");}
});
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---