Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
» Ensure that jail effects for different formatters work when applied to the same page
Status:
Needs review
» Needs work
This works, but there's a related problem that the formatter and js only really works for having one formatter displayed on a page, so it needs fixing to target a bit more specifically.
In this case, it didn't repeat this function over and over again. When I did this, it resolved a lot of the issues that people have been bringing up - no flickering, works well across browsers, etc. ( I still can't get it to work with infinite scroll but that will just require a callback property). See for yourself! http://dev.sportswriters2.gotpantheon.com/ (only works on the front page)
I'd say that using a different css selector for different formatter instances, and a different function (for different effects, options, etc.) and as well ensuring that there is no duplicate instances of this jquery function will go a long way for this module!
Comments
Comment #1
catchThis works, but there's a related problem that the formatter and js only really works for having one formatter displayed on a page, so it needs fixing to target a bit more specifically.
Comment #2
rerooting CreditAttribution: rerooting commentedI'd say that it's very important to tackle the issue of the repeat scripts.
I was able to use a tactic similar to this to force ONLY this function to load in the footer:
(function ($) {$(".lazy").jail({placeholder : "/sites/all/modules/jail/white.gif", effect : "fadeIn"});})(jQuery);
In this case, it didn't repeat this function over and over again. When I did this, it resolved a lot of the issues that people have been bringing up - no flickering, works well across browsers, etc. ( I still can't get it to work with infinite scroll but that will just require a callback property). See for yourself! http://dev.sportswriters2.gotpantheon.com/ (only works on the front page)
I'd say that using a different css selector for different formatter instances, and a different function (for different effects, options, etc.) and as well ensuring that there is no duplicate instances of this jquery function will go a long way for this module!