PageSourceSearch

https://waselpro.com/static/js/bootstrap.alert.js

js waselpro.com collected 2026-09-24 18:04:54 UTC 1,803 bytes, 83 lines download raw bytes

vendor: 1,803 bytes, lines 1-83
1+function ($) {
2  'use strict';
3
4  // ALERT CLASS DEFINITION
5  // ======================
6
7  var dismiss = '[data-dismiss="alert"]'
8  var Alert   = function (el) {
9    $(el).on('click', dismiss, this.close)
10  }
11
12  Alert.VERSION = '3.2.0'
13
14  Alert.prototype.close = function (e) {
15    var $this    = $(this)
16    var selector = $this.attr('data-target')
17
18    if (!selector) {
19      selector = $this.attr('href')
20      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
21    }
22
23    var $parent = $(selector)
24
25    if (e) e.preventDefault()
26
27    if (!$parent.length) {
28      $parent = $this.hasClass('alert') ? $this : $this.parent()
29    }
30
31    $parent.trigger(e = $.Event('close.bs.alert'))
32
33    if (e.isDefaultPrevented()) return
34
35    $parent.removeClass('in')
36
37    function removeElement() {
38      // detach from parent, fire event then clean up data
39      $parent.detach().trigger('closed.bs.alert').remove()
40    }
41
42    $.support.transition && $parent.hasClass('fade') ?
43      $parent
44        .one('bsTransitionEnd', removeElement)
45        .emulateTransitionEnd(150) :
46      removeElement()
47  }
48
49
50  // ALERT PLUGIN DEFINITION
51  // =======================
52
53  function Plugin(option) {
54    return this.each(function () {
55      var $this = $(this)
56      var data  = $this.data('bs.alert')
57
58      if (!data) $this.data('bs.alert', (data = new Alert(this)))
59      if (typeof option == 'string') data[option].call($this)
60    })
61  }
62
63  var old = $.fn.alert
64
65  $.fn.alert             = Plugin
66  $.fn.alert.Constructor = Alert
67
68
69  // ALERT NO CONFLICT
70  // =================
71
72  $.fn.alert.noConflict = function () {
73    $.fn.alert = old
74    return this
75  }
76
77
78  // ALERT DATA-API
79  // ==============
80
81  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
82
83}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.