0

I am using selectable jquery ui for selecting grids(5000 grids in a page), the code is bellow:

     $( ".sell-grid" ).selectable({
    // cancel:'div.al-selected',
    // filter: "div.al-unselected",
    // disabled: false,

    stop: function() {
        var pixed_selected  = $( "#pixed_selected" ).empty();
        var tpixel          =   $("#tpixel").empty();
        var totalPrice      =   $("#totalPrice").empty();
        var tprice          =   $("#tprice").empty();
        var count = 0;
        var SelectedPrice   =   0;

        $( ".ui-selected", this ).each(function() {

            var index = $( "#selectable li" ).index( this );
            count ++ ;
            var id = $(this).attr('id');
            selectedpixel.push(id);

        });
        SelectedPrice = (count * 20);

        tpixel.val(count);
        pixed_selected.html(count);

        tprice.val(SelectedPrice);
        totalPrice.html(SelectedPrice);
    }


});

using above code when i select the grid it is also selecting previous selected grid.

Problem is that, i want to stop grid selection if previously selected grids meat

Answer if any one knows.

0 Answers0