Changeset 123128 in spip-zone


Ignore:
Timestamp:
Mar 25, 2020, 2:28:51 PM (2 weeks ago)
Author:
ARNO*
Message:

Détecter le scroll sur «body», pas sur «window».

Location:
_plugins_/medias_responsive_mod
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/medias_responsive_mod

    • Property subgit:lock:15e15ac2aca47cb8393d0d342b61d6bc932926a2 set to 2020-03-25T15:29:05.939
  • _plugins_/medias_responsive_mod/paquet.xml

    r119114 r123128  
    22        prefix="medias_responsive_mod"
    33        categorie="multimedia"
    4         version="1.11.4"
     4        version="1.11.5"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.2.*]"
  • _plugins_/medias_responsive_mod/squelettes/javascript/medias_responsive.js

    r118440 r123128  
    3737function _declencher_documents_actifs() {
    3838        if (scrollT) var sTop = scrollT;
    39         else var sTop = $(window).scrollTop();
     39        else var sTop = $("body").scrollTop();
    4040
    41         var hauteur = $(window).height();
     41        var hauteur = $("body").height();
    4242       
    4343        var limite_haut = sTop - 0.2*hauteur;
     
    6464$(window).smartresize(calculer_spip_documents);
    6565
    66 $(window).on("load scroll touchmove",declencher_documents_actifs);
     66$(window).on("load",declencher_documents_actifs);
     67$("body").on("scroll touchmove",declencher_documents_actifs);
    6768$(document).on("ajaxComplete", declencher_documents_actifs);
    6869
Note: See TracChangeset for help on using the changeset viewer.