hover_popover 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -6
- data/vendor/assets/javascripts/hover_popover.js +2 -10
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d74a74c708f22de9178446d25a72d063ddc914f
|
|
4
|
+
data.tar.gz: 3da46181ad4e0b2187d51e797aff817cb49147e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a492bf9f444aef606e3c0195bb542fd8b5a59c0606ab321ab01247d8d4b673760efc6ddb7fd80c3a36293d619917608d2ee1ef4a8db9a08e47b915b448b07782
|
|
7
|
+
data.tar.gz: bbb2cc02c50f7a64990612a7fd88f09c4bfab857671a0d0d238fcca3ab5b7249139648e9988533a69505de2db44e8aa908312ee3beaef788463f643c325c6408
|
data/README.md
CHANGED
|
@@ -12,6 +12,11 @@ Add to your Gemfile:
|
|
|
12
12
|
gem 'hover_popover'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
In application.js
|
|
16
|
+
```ruby
|
|
17
|
+
//= require hover_popover
|
|
18
|
+
```
|
|
19
|
+
|
|
15
20
|
Usage
|
|
16
21
|
-----
|
|
17
22
|
|
|
@@ -36,7 +41,6 @@ Docs
|
|
|
36
41
|
Default options:
|
|
37
42
|
```js
|
|
38
43
|
html: false,
|
|
39
|
-
ajax: false,
|
|
40
44
|
container: 'body',
|
|
41
45
|
trigger: 'manual',
|
|
42
46
|
content: '',
|
|
@@ -47,10 +51,5 @@ delay: { show: 0, hide: 400 }
|
|
|
47
51
|
|
|
48
52
|
See Bootstrap popover documentation for more options.
|
|
49
53
|
|
|
50
|
-
For elements that are not initially added to the DOM set ajax: true.
|
|
51
|
-
This will bind the hover event listener to the document.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
54
|
|
|
56
55
|
Note: trigger needs to be set to manual or not overriden in order to function appropriately.
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
content: '',
|
|
21
21
|
title: '',
|
|
22
22
|
placement: 'top',
|
|
23
|
-
ajax: false
|
|
24
23
|
delay: { show: 0, hide: 400 }
|
|
25
24
|
}
|
|
26
25
|
|
|
@@ -32,17 +31,10 @@
|
|
|
32
31
|
this.$element.popover(this.options)
|
|
33
32
|
this.popover = this.$element.data('bs.popover')
|
|
34
33
|
|
|
35
|
-
var ajax = this.options.ajax
|
|
36
34
|
var trigger = this.options.trigger
|
|
37
35
|
if (trigger == 'manual') {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$(document).on('mouseenter', this.$element, $.proxy(this.enter, this))
|
|
41
|
-
$(document).on('mouseleave', this.$element, $.proxy(this.enter, this))
|
|
42
|
-
} else {
|
|
43
|
-
this.$element.on('mouseenter', $.proxy(this.enter, this))
|
|
44
|
-
this.$element.on('mouseleave', $.proxy(this.leave, this))
|
|
45
|
-
}
|
|
36
|
+
this.$element.on('mouseenter', $.proxy(this.enter, this))
|
|
37
|
+
this.$element.on('mouseleave', $.proxy(this.leave, this))
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
|