PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
inc
/
shortcodes
/
single-image
/
assets
/
js
/
parts
(function ($) { "use strict"; qodefCore.shortcodes.webon_core_single_image = {}; qodefCore.shortcodes.webon_core_single_image.qodefMagnificPopup = qodef.qodefMagnificPopup; $(document).ready(function () { qodefSingleImageParallaxBackground.init(); }); $(window).load(function () { qodefSingleImageParallaxBackground.initParallaxElements(); }); var qodefSingleImageParallaxBackground = { init: function () { this.images = $('.qodef-single-image.qodef--parallax-background-image'); if (this.images.length) { this.images.each(function () { var $thisImage = $(this); // if (qodef.windowWidth > 1024) { // } qodefSingleImageParallaxBackground.parallaxElements($thisImage); }); } }, parallaxElements: function ($image) { var itemImage = $image.find('.qodef-m-background-image'), imgBack = itemImage.find('img'); if (qodef.body.hasClass('qodef-scrolling-smooth')){ imgBack.attr('data-parallax', '{"y" : 120 , "smoothness": 20}'); } else { imgBack.attr('data-parallax', '{"y" : 70 , "smoothness": 20}'); } }, initParallaxElements: function () { var parallaxInstances = $(".qodef-single-image [data-parallax]"); if ( parallaxInstances.length ) { ParallaxScroll.init(); //initialzation removed from plugin js file to have it run only on non-touch devices } } }; })(jQuery);
[+]
..
[-] single-image.js
[edit]