I have the following code:

//add the ability to drag columns
if(options.draggable === true)
{
    $('#' + options.element_id + ' table.cr_data_grid tbody tr th
span').bind('mousemove', function(event)
        {
                if(self.resize === true)
                {
            var change = event.pageX - self.mouse_down_start;
                        $(this).parent().css('width', $(this).parent().width() 
+ change);
                        self.mouse_down_start = 
event.pageX;$('body').append('mouse down at ' +
event.pageX + ' and this columns width is' + $(this).parent().width());
                }
        });

        $('#' + options.element_id + ' table.cr_data_grid tbody tr th
span').bind('mousedown', function(event)
        {
                self.resize = true;
                //self.resize_id = $(this).parent().slice(0, 1).attr('id');
                self.mouse_down_start = event.pageX;$('body').append('mouse 
down at ' +
event.pageX + ' and this columns width is' + $(this).parent().width());
        });

        $('#' + options.element_id + ' table.cr_data_grid tbody tr th
span').bind('mouseup', function(event)
        {
                var change = event.pageX - self.mouse_down_start;
                $(this).parent().css('width', $(this).parent().width() + 
change);

                self.mouse_down_start = 0;
                self.resize = false;
                //self.resize_id = null;
        });
}

And this code works properly for the most part however this is one thing
that is no working properly.  If i drag and try to resize a column past the
minimum width it stop as the minimum width but as i move my mouse if the
opposite direct is will start resize the column, even if my mouse is no
where near the column itself.  Is there a way to confine the resize only if
the mouse if over the handle that does the resizing?
-- 
View this message in context: 
http://www.nabble.com/Issue-with-my-dragging-code-tp21091128s27240p21091128.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to