PageSourceSearch

https://riversideca.gov/js/corweb/bootstrap/popover.js?oqtub7

js riversideca.gov collected 2026-09-24 08:52:27 UTC 3,626 bytes, 119 lines download raw bytes

1/* ========================================================================
2 * Bootstrap: popover.js v3.3.1
3 * http://getbootstrap.com/javascript/#popovers
4 * ========================================================================
5 * Copyright 2011-2014 Twitter, Inc.
6 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 * ======================================================================== */
8
9
10+function ($) {
11  'use strict';
12
13  // POPOVER PUBLIC CLASS DEFINITION
14  // ===============================
15
16  var Popover = function (element, options) {
17    this.init('popover', element, options)
18  }
19
20  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
22  Popover.VERSION  = '3.3.1'
23
24  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
25    placement: 'right',
26    trigger: 'click',
27    content: '',
28    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
29  })
30
31
32  // NOTE: POPOVER EXTENDS tooltip.js
33  // ================================
34
35  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
36
37  Popover.prototype.constructor = Popover
38
39  Popover.prototype.getDefaults = function () {
40    return Popover.DEFAULTS
41  }
42
43  Popover.prototype.setContent = function () {
44    var $tip    = this.tip()
45    var title   = this.getTitle()
46    var content = this.getContent()
47
48    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
49    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
50      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
51    ](content)
52
53    $tip.removeClass('fade top bottom left right in')
54
55    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
56    // this manually by checking the contents.
57    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
58  }
59
60  Popover.prototype.hasContent = function () {
61    return this.getTitle() || this.getContent()
62  }
63
64  Popover.prototype.getContent = function () {
65    var $e = this.$element
66    var o  = this.options
67
68    return $e.attr('data-content')
69      || (typeof o.content == 'function' ?
70            o.content.call($e[0]) :
71            o.content)
72  }
73
74  Popover.prototype.arrow = function () {
75    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
76  }
77
78  Popover.prototype.tip = function () {
79    if (!this.$tip) this.$tip = $(this.options.template)
80    return this.$tip
81  }
82
83
84  // POPOVER PLUGIN DEFINITION
85  // =========================
86
87  function Plugin(option) {
88    return this.each(function () {
89      var $this    = $(this)
90      var data     = $this.data('bs.popover')
91      var options  = typeof option == 'object' && option
92      var selector = options && options.selector
93
94      if (!data && option == 'destroy') return
95      if (selector) {
96        if (!data) $this.data('bs.popover', (data = {}))
97        if (!data[selector]) data[selector] = new Popover(this, options)
98      } else {
99        if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
100      }
101      if (typeof option == 'string') data[option]()
102    })
103  }
104
105  var old = $.fn.popover
106
107  $.fn.popover             = Plugin
108  $.fn.popover.Constructor = Popover
109
110
111  // POPOVER NO CONFLICT
112  // ===================
113
114  $.fn.popover.noConflict = function () {
115    $.fn.popover = old
116    return this
117  }
118
119}(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.