source: prototipo_portal_2018/prototipo/static/js/clean-blog.js @ 0500480

Last change on this file since 0500480 was 747e744, checked in by Antonio Araujo <aaraujo@…>, 7 years ago

Creado directorio prototipo con fuentes de la modificación del portal para establecer la ubicación de la firma visible

  • Property mode set to 100644
File size: 1.7 KB
Line 
1// Floating label headings for the contact form
2$(function() {
3    $("body").on("input propertychange", ".floating-label-form-group", function(e) {
4        $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
5    }).on("focus", ".floating-label-form-group", function() {
6        $(this).addClass("floating-label-form-group-with-focus");
7    }).on("blur", ".floating-label-form-group", function() {
8        $(this).removeClass("floating-label-form-group-with-focus");
9    });
10});
11
12// Navigation Scripts to Show Header on Scroll-Up
13jQuery(document).ready(function($) {
14    var MQL = 1170;
15
16    //primary navigation slide-in effect
17    if ($(window).width() > MQL) {
18        var headerHeight = $('.navbar-custom').height();
19        $(window).on('scroll', {
20                previousTop: 0
21            },
22            function() {
23                var currentTop = $(window).scrollTop();
24                //check if user is scrolling up
25                if (currentTop < this.previousTop) {
26                    //if scrolling up...
27                    if (currentTop > 0 && $('.navbar-custom').hasClass('is-fixed')) {
28                        $('.navbar-custom').addClass('is-visible');
29                    } else {
30                        $('.navbar-custom').removeClass('is-visible is-fixed');
31                    }
32                } else if (currentTop > this.previousTop) {
33                    //if scrolling down...
34                    $('.navbar-custom').removeClass('is-visible');
35                    if (currentTop > headerHeight && !$('.navbar-custom').hasClass('is-fixed')) $('.navbar-custom').addClass('is-fixed');
36                }
37                this.previousTop = currentTop;
38            });
39    }
40});
Note: See TracBrowser for help on using the repository browser.