This file contains 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
class Carousel { | |
constructor() { | |
console.log('>>> Carousel constructor'); | |
this.carouselInstances = {}; | |
this.initCarousel(); | |
} | |
initCarousel() { | |
let that = this; | |
const carousel = $('.js-carousel'); |
This file contains 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
class Slide { | |
constructor() { | |
console.log('>>> Slide constructor'); | |
this.initSlide(); | |
} | |
initSlide() { | |
const swiperInstances = {}; | |
$('.slide').each(function(index, element){ | |
let $this = $(this); |
This file contains 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
(function ($) { | |
$.fn.progressBar = function(){ | |
return this.each(function() { | |
var bar = this, | |
bar_progress = $(bar).find('.loading'); | |
$(window).scroll(function(){ | |
if(scrolledIntoView(bar)){ | |
var each_bar_width = bar_progress.attr('aria-valuenow'); |
This file contains 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
(function ($) { | |
$.fn.scrolledIntoView = function(){ | |
var elem = $(this), | |
docViewTop = $(window).scrollTop(), | |
docViewBottom = docViewTop + $(window).height(), | |
elemTop = $(elem).offset().top, | |
elemBottom = elemTop + $(elem).height(); | |
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom) && (elemBottom <= docViewBottom) && (elemTop >= docViewTop)); | |
}; |
This file contains 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
// Maps | |
window.mod.maps = function() { | |
var init = function() { | |
console.log('[brz] begin maps.js'); | |
loadScript(); | |
}; | |
var loadScript = function() { | |
var script = document.createElement('script'); |
This file contains 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
(function ($) { | |
$.fn.gmaps = function(options) { | |
return this.each(function() { | |
var settings = $.extend({ | |
zoom: 16, | |
scrollwheel: false, | |
center: new google.maps.LatLng(-7.119764,-34.872458) | |
},options); |
This file contains 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
// Common | |
window.mod.common = function() { | |
// Scope | |
var that = this; | |
var init = function() { | |
console.log('[brz] begin common.js'); | |
window.mod.navbar = new window.mod['navbar'](); |