nk-o / jarallax

Parallax scrolling for modern browsers

Home Page:https://jarallax.nkdev.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable Parallax or Disable Video Does not work when using data-disable-parallax="true"

BackuPs opened this issue · comments

Issue description:

Disable Parallax or Disable Video Does not work when using data-disable-parallax="true" or data-disable-video="true"

Version used:

(Did you try using the develop branch from GitHub? There's a chance your issue has already been addressed there)
2.2.0

Code to reproduce the issue (HTML blocks + JavaScript initialization)

Just add  data-disable-video = "true" data-disable-parallax = "true"  to the html code in the html demo.
This code in the script is responsible for not working of that code.

      if (typeof self.options.disableVideo !== 'function') {
        self.options.disableVideo = () => false;
      }
      
     should be changed to
     
      if (self.options.disableVideo == true) self.options.disableVideo = () => true;
      else self.options.disableVideo = () => false;
      
      and this
      
      if (typeof self.options.disableParallax !== 'function') {
        self.options.disableParallax = () => false;
      }
      
      should be changed to
    
     if (self.options.disableParallax==true) self.options.disableParallax = () => true;
     else self.options.disableParallax = () => false;