Drupal - add JS code

0 votes
78 views
added Aug 7, 2019 in Drupal by lcjr First Warrant Officer (9,190 points)
drupal_add_js('
  (function($) {
    $(window).on("load", function(){
      if ($("body").hasClass("new-launch"))
        $("body").addClass("loaded");
    });
  })(jQuery);
  ',
  array('group' => JS_THEME, 'scope' => 'footer', 'type' => 'inline')
);

 

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