It took me awhile but I figured it out if anyone else can benefit from this simple hack. I altered the plugins core files so if it ever gets updated I’ll have to do this again.
Download and install wp mobile detect plugin and add this to the SSJPB php file:
$detect = new Mobile_Detect();
if ( $detect->isMobile() ){}
else
So the end result looks like this:
function super_simple_jquery_parallax_background_action() {
$detect = new Mobile_Detect();
if ( $detect->isMobile() ){}
else
// Any mobile device (phones or tablets).
// Register and queue Javascript file.
wp_register_script(
'super_simple_jquery_parallax_background_js',
// dirname(__FILE__)
plugins_url('/assets/js/super-simple-jquery-parallax-background.js', __FILE__),
array('jquery'), // Dependency.
false, // Specific version, if exists.
true // Enqueue for footer instead of head.
);
wp_enqueue_script('super_simple_jquery_parallax_background_js');
}
add_action('wp_enqueue_scripts', 'super_simple_jquery_parallax_background_action');
If you want to kill parallax scrolling only on phones ONLY and not tablets use this instead:
if( $detect->isMobile() && !$detect->isTablet() )
The WP plugin is based on this: https://mobiledetect.net/