purple.js 299 B

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