I’m using a jquery plugin called Gridster.
When initializing my grid I’m trying to set a callback for collision.on_overlap_stop however everytime I set it the program throws all kinds of errors in the gridster code.
Has anyone else run into this problem?
code example:
<script type="text/javascript">
var gridster;
$(function(){
gridster = $(".gridster ul").gridster({
widget_margins: [10, 10],
widget_base_dimensions: [140, 140],
draggable: {
stop: function(event, ui)
{
//code...
}
},
collision:
{
//this function doesn't seem to be called and when this function is set the page crashes.
on_overlap_stop: function(collider_data)
{
//code....
}
},
}).data('gridster');
});
</script>
Just ran into the same issue. If you want to use the
on_overlap_stoporon_overlap_start, you need to supply them both. That way no errors are shown.