Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery .each - get all objects in one element

0 votes
added Sep 5 in jQuery by LC Marshal Lieutenant (13,450 points)
edited Sep 5 by LC Marshal
//clone every image to popup element when click 
var floorplanImg = $('.detail-content.floorplan img'),
    imgModal = $('.global-overlay-modal');

$(floorplanImg).each(function(index) {
    $(this).on('click', function(){
        var imgSingle = $(this).clone();
        // console.log($(this).attr('src'));
        if($(imgModal).hasClass('active')) {
            $(imgModal).click(function (){


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.