green.js 300 B

123456789
  1. (function ($) {
  2. Drupal.behaviors.jsWeightsGreen = {
  3. attach: function (context, settings) {
  4. var weight = settings.jsWeights.green;
  5. var newDiv = $('<div></div>').css('color', 'green').html('I have a weight of ' + weight);
  6. $('#js-weights').append(newDiv);
  7. }
  8. };
  9. })(jQuery);