Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery .hasClass() method

0 votes
5 views
added May 24 in jQuery by LC Marshal Lieutenant (12,650 points)

To use hasClass() method  for more than 1 class

if($('body').hasClass('page-area-outlook') || $('body').hasClass('page-project-outlook')) {
    var outlookMap = $('#outlook-map');
    $(outlookMap).closest('section');
    $('html,body').animate({},0,"easeOutQuart",function(){
        if(heatmap == null){
            initHeatmap();
        }
    });
}

1 Response

0 votes
responded May 24 by LC Marshal Lieutenant (12,650 points)

if body hasClass() ,hide() element

if($('body').hasClass('newlaunches')) {
  $('.float-agent-contact').hide();
} 
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...