How to fix footer at bottom gap without using height fixed?

How to fix footer at bottom gap without using height fixed?


 $(function () {
        function adjust() {
            var winH = $(window).height(),
                docH = $('document').height();

            if (docH > winH) {
                //leave it
            } else {
                $('.footer').addClass('fixedfooter');
            }
        }
        $(window).on('resize', adjust);
 adjust();
    })

How to add more than one click events on same element using Jquery?


$(document).on('click', 'a.menu', function() { 
  console.log('first');
});
$(document).on('click', 'a.active', function() { 
  console.log('second');  
});

How to add active class if corresponding page is active?


$(function () {
    var current = location.pathname;
    
$('.menu-primary .nav li a').each(function () {
        var $this = $(this);
        
// if the current path is like this link, make it active
        
if ($this.attr('href').indexOf(current) !== -1) {
            $this.addClass('active');
        }
    })
})

Add active class in tab head when click it


    $(document).ready(function () {
        $('.route-activity .nav li').click(function (e) {
            $('.route-activity .nav li').removeClass('active');
            var $this = $(this);
            if (!$this.hasClass('active')) {
                $this.addClass('active');
            }
            //e.preventDefault();
        });
 });

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *