Skip to content

AJAX Gallery Problem #34

@svanetten1976

Description

@svanetten1976

Hi Martin,
First of all, I really like touchTouch. Its an excellent plugin, especially for mobile. But I've been running into an issue with dynamic content, specifically AJAX-loaded thumbnails. I have a pretty complex interface and it seems like after a couple of AJAX-loaded content changes, the plugin can't find the right image (or any image to load). One user had suggested $('.placeholder').remove() before re-calling the plugin on newly loaded thumbnails, but it doesn't consistently work. The whole thing fails very irregularly, so I can't trace what the exact problem is. Any ideas how I could fix this? Here's the block of code I've been trying to use to re-call the plugin after the AJAX thumbs have loaded:
$.removeData($.data($.fn.touchTouch));
$.removeData($.fn.touchTouch);
$('.placeholder').remove();
$('#gallerySlider').find('.placeholder').remove();
$('.portfolio-item .image a').touchTouch();
FYI, I tried editing the plugin itself to make it fully compatible with dynamic content, but I can't figure it out. Thanks -- Steve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions