Created
October 17, 2019 22:21
-
-
Save MrFent/6a97fb04ed6fee1d115ebecfc839d29e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Line 2055 | |
if ( 'parallax' == $row->settings->bg_type && ! empty( $row->settings->bg_parallax_image_src ) ) { | |
$attrs['data-parallax-speed'] = $row->settings->bg_parallax_speed; | |
$attrs['data-parallax-image'] = $row->settings->bg_parallax_image_src; | |
$attrs['data-parallax-offset'] = $row->settings->bg_parallax_offset; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Line 373 | |
/** | |
* Fires when the window is scrolled to adjust | |
* a single parallax background. | |
* | |
* @since 1.1.4 | |
* @access private | |
* @method _scrollParallaxBackground | |
*/ | |
_scrollParallaxBackground: function() | |
{ | |
var win = $(window), | |
row = $(this), | |
content = row.find('> .fl-row-content-wrap'), | |
speed = row.data('parallax-speed'), | |
offset = content.offset(), | |
yPos = -((win.scrollTop() - offset.top) / speed), | |
initialoffset = ( row.data('parallax-offset') != null ) ? row.data('parallax-offset') : 0, | |
totaloffset = yPos - initialoffset; | |
content.css('background-position', 'center ' + totaloffset + 'px'); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Line 513 | |
'bg_parallax' => array( | |
'title' => __( 'Background Parallax', 'fl-builder' ), | |
'fields' => array( | |
'bg_parallax_image' => array( | |
'type' => 'photo', | |
'show_remove' => true, | |
'label' => __( 'Photo', 'fl-builder' ), | |
'preview' => array( | |
'type' => 'none', | |
), | |
'connections' => array( 'photo' ), | |
), | |
'bg_parallax_speed' => array( | |
'type' => 'select', | |
'label' => __( 'Speed', 'fl-builder' ), | |
'default' => 'fast', | |
'options' => array( | |
'2' => __( 'Fast', 'fl-builder' ), | |
'5' => _x( 'Medium', 'Speed.', 'fl-builder' ), | |
'8' => __( 'Slow', 'fl-builder' ), | |
), | |
'preview' => array( | |
'type' => 'none', | |
), | |
), | |
'bg_parallax_offset' => array( | |
'type' => 'unit', | |
'label' => __( 'Image Offset', 'fl-builder' ), | |
'responsive' => true, | |
'default' => 0, | |
'slider' => array( | |
'min' => 0, | |
'max' => 1000, | |
'step' => 10, | |
), | |
'preview' => array( | |
'type' => 'none', | |
), | |
), | |
), |
Author
MrFent
commented
Jul 11, 2022
via email
no need for a readme, it's live. I don't think parallax works on mobile
…On Mon, Jul 11, 2022 at 9:35 AM iamandrewpeters ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Hey! Could you add a Read Me file to this by chance? Trying to get the
parallax working on mobile and came across this in the FB group!
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/6a97fb04ed6fee1d115ebecfc839d29e#gistcomment-4227816>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJGLNL7IBTLC5IGSHT4JWLVTQPKXANCNFSM53HRIVFQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment