mintu_2 0 Newbie Poster

Hi everyone i have this code

setTimeout(function() { 
    var hiddenimages = [],albumcover;
    albumcover = uploadSuccess.udest + imagesarray[0]; // 
    for (var i = 0; i < imagesarray.length; i++) {
      imagepath = uploadSuccess.udest + imagesarray[i];// user image location..
      //if(i != 0)
      hiddenimages += "<a class='dfed _p040red uid glryview501 _p44oid' href=" + imagepath + "><img src=" + imagepath + "></a>";
      //hiddenimages+= "{ src: "+imagepath+",'thumb': "+imagepath+"}";
      //hiddenimages[i] = "";

    }
    console.log(hiddenimages);//<a hre..>.</a>...<a hrf.>...</a>...
    //$("._d123e").append(hiddenimages);
    $glryPostContainer = "<span class='_p033'>" +
        "<center><span class='_p421rud'>" +
        "<a class='dfed' href=" + albumcover + ">" +
        "<img src='" + albumcover + "' class='_p034 eeac'/>" +
        "</a>" + hiddenimages +
        "<span class='_p38er dhku'>" +
        "<p class='_p39e opikd'>" + imagesarray.length + "+</p>" +
        "</span>" +
        "</span></center>" +
        "</span>";

    $("._e11red").append($glryPostContainer);// <div class="e11red"> is in html file
    $("._p421rud").lightGallery();
}, 1000);

this code give me
Uncaught TypeError: Cannot read property 'match' of undefined lightgallery.js:414 error when i open or click on albumcover image and show me loading gif here a image . In plus lightgallery count 1+ image.... if display images are 5 and lightgellery shows 7(5 are hidden images bheind album cover and 6th is album coverand 7th is unknow). What i have wrong done ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.