D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ltfsolutionsco
/
www
/
wp-content
/
plugins
/
ml-slider
/
themes
/
starter
/
v1.0.0
/
Filename :
script.js
back
Copy
(function($) { /** * Extra JS for the Architekt theme * * 1. positions the different elements: * - arrows */ // metaslider has been initilalised $(document).on('metaslider/initialized', function(e, identifier) { // if .ms-theme-starter if ($(identifier).closest('.metaslider.ms-theme-starter').length) { var $slider = $(identifier); var $container = $(identifier).closest('.metaslider.ms-theme-starter'); $container.addClass('ms-loaded'); } $(window).trigger('resize'); }); $(window).on('resize', function(e) { // go through the sliders with this theme $('.metaslider.ms-theme-starter').each(function(index) { // slightly delay action after resize for a smoother transition setTimeout(function() { // gets the slideshow's height var height = get_max_height($(this).find('.ms-image > img')); // if has thumbnail nav if ($(this).is('.has-thumb-nav')) { // Arrows $(this).find('.flex-direction-nav a').css({'top': Math.round(height / 2), 'bottom': 'auto'}); } }.bind(this), 50); }); }); /** * Get maximum height of the elements collection * * @param {jQuery object} elms * @return {int} */ var get_max_height = function(elms) { var h = 0; $(elms).each(function(index) { if ($(this).height() > h) { h = $(this).height(); } }); return h; } })(jQuery)
Name
Size
Last Modified
Owner
Permissions
Actions
script.js
1.332
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
style.min.css
6.228
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
style.postcss
2.996
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
theme.php
1.598
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
2017 © D7net | D704T team