Use removeImage() for the selected image

Jul 20, 2012 at 3:23 AM

Hello,

first of all it's great plugin..

i added modification on gallery which id add button to description paragraph ('ad-image-description'), this button for remove image and in click event i use the following code:

 var li_Obj = $('.ad-thumb-list li');

                    //$('.ad-thumb-list li').each(function (index) {
                    for (var j = 0; j < li_Obj.size(); j++) {

                        var liCount = $('.ad-thumb-list li').size();
                        var anchor = li_Obj.eq(j).find('a');
                        if (anchor.hasClass('ad-active')) {
                            galleries[0].removeImage(j);
                            break;
                        }
                    }

 

the problem is if you remove first image, plugin will remove the item from thumbnail correctly but the main image('ad-image') will still exist and not effected by removable method.

Please any help....

thanks in advance,

Ahmed Sobhy