Submit
Path:
~
/
home
/
getwphos
/
public_html
/
ccma
/
wp-content
/
themes
/
curly
/
framework
/
modules
/
title
/
assets
/
js
/
File Content:
title.js
(function ($) { "use strict"; var title = {}; mkdf.modules.title = title; title.mkdfOnDocumentReady = mkdfOnDocumentReady; $(document).ready(mkdfOnDocumentReady); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfParallaxTitle(); } /* ** Title image with parallax effect */ function mkdfParallaxTitle() { var parallaxBackground = $('.mkdf-title-holder.mkdf-bg-parallax'); if (parallaxBackground.length > 0 && mkdf.windowWidth > 1024) { var parallaxBackgroundWithZoomOut = parallaxBackground.hasClass('mkdf-bg-parallax-zoom-out'), titleHeight = parseInt(parallaxBackground.data('height')), imageWidth = parseInt(parallaxBackground.data('background-width')), parallaxRate = titleHeight / 10000 * 7, parallaxYPos = -(mkdf.scroll * parallaxRate), adminBarHeight = mkdfGlobalVars.vars.mkdfAddForAdminBar; parallaxBackground.css({'background-position': 'center ' + (parallaxYPos + adminBarHeight) + 'px'}); if (parallaxBackgroundWithZoomOut) { parallaxBackground.css({'background-size': imageWidth - mkdf.scroll + 'px auto'}); } //set position of background on window scroll $(window).scroll(function () { parallaxYPos = -(mkdf.scroll * parallaxRate); parallaxBackground.css({'background-position': 'center ' + (parallaxYPos + adminBarHeight) + 'px'}); if (parallaxBackgroundWithZoomOut) { parallaxBackground.css({'background-size': imageWidth - mkdf.scroll + 'px auto'}); } }); } } })(jQuery);
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
title.js
1831 bytes
0644
N4ST4R_ID | Naxtarrr