Drupal - JS condition for frontpage and not

0 votes
232 views
added Nov 14, 2018 in Drupal by LC Marshal Captain (25,790 points)
if ($('body').hasClass('front')) {
 // do something
}
else {
 // do something else
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...