tutorialzine/touchTouch

Ajax Issue

jhemsley30 opened this issue · 12 comments

Is there a way this code can be altered so it will attach itself with content loaded via ajax? I'm using this gallery on a Drupal installation (which has some built in ajax in views), everything works great until the content is loaded with ajax, the gallery fails to work. Am I looking at this the correct way?
Thanks,
James

Any thoughts

They way I fixed this was to remove all the placeholders before I called the touchTouch plugin again after loading my new items...

$('.placeholder').remove();
$('.thumbs a').touchTouch();

Hello, I'm looking for a tutorial on how to integrate this gallery on a drupal 7 website (instead of my actual lghtbox), do you have some advices or adresses for this? (my skills with drupal are only working with modules and theming tricks with html/css!!)
Thanks

Frank, the only way I was able to make this work was to implement the code directly onto the tpl.php files. I'm looking for more of a Drupal way, as well.

dakins, your solution works, thank you

Hello I am having the same problem as jhemsley30 was having, can someone please specify what Dakins means when he says to remove the placeholders. Thanks

Hi all,
I am still having the same issue, and due to the complexity of the AJAX gallery I've built, the $('.placeholder').remove() workaround doesn't always do it for me. Anyone have any ideas how to truly make jQuery.touchTouch work consistently with AJAX content. I tried editing the plugin myself, but I just kept breaking things.... Any help at all would be much appreciated! Thanks, Steve

Steve I've tried everything to get touchTouch working with AJAX. I switched to fancyBox and things worked out. Hope this helps 😊

-----Original Message-----
From: "svanetten1976" notifications@github.com
Sent: ‎12/‎3/‎2014 2:10 PM
To: "martinaglv/touchTouch" touchTouch@noreply.github.com
Cc: "Rafael Cepeda" rcepeda1993@gmail.com
Subject: Re: [touchTouch] Ajax Issue (#12)

Hi all,
I am still having the same issue, and due to the complexity of the AJAX gallery I've built, the $('.placeholder').remove() workaround doesn't always do it for me. Anyone have any ideas how to truly make jQuery.touchTouch work consistently with AJAX content. I tried editing the plugin myself, but I just kept breaking things.... Any help at all would be much appreciated! Thanks, Steve

Reply to this email directly or view it on GitHub.=

i hava a idear for working with Ajax we can use $("#gallerySlider").empty();

my english is poor maybe i didn't understand this issue, the issue how to truly make toucuPlugin work consisitently with ajax contnet .before jquery1.9 versoin,use live() bind event for add element after,but now is use on(event,elemet,callback());so you can try to do this methd

add element later

If you're looking for a Drupal-module to support this plugin, check out http://www.drupal.org/project/touchtouch