
| Current Path : /var/www/html/rocksensor1/web/themes/contrib/adaptivetheme/at_core/scripts/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/themes/contrib/adaptivetheme/at_core/scripts/at.windowSize.js |
(function ($) {
"use strict";
/**
* Renders a widget for displaying the current width of the browser.
*/
Drupal.behaviors.atWS = {
attach: function (context, settings) {
var indicator = $('<div class="window-size-indicator wsi" />').appendTo(document.body),
indicator_px = $('<div class="wsi__px" />').appendTo(indicator),
indicator_em = $('<div class="wsi__em" />').appendTo(indicator),
indicator_bp = $('<div class="wsi__bp" />').appendTo(indicator);
// Bind to the window.resize event to continuously update the width.
$(window).bind('resize.window-size-indicator', function () {
indicator_px.html($(this).width() + 'px');
indicator_em.html($(this).width() /16 + 'em');
}).trigger('resize.window-size-indicator');
}
};
})(jQuery);