hover_popover 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87f38dec9a61681c2cf650e5dcc2f85545632c0f
4
- data.tar.gz: ab7391d46f8cf9e23ad8c13d1ac461a3f5a4dd22
3
+ metadata.gz: 6d74a74c708f22de9178446d25a72d063ddc914f
4
+ data.tar.gz: 3da46181ad4e0b2187d51e797aff817cb49147e0
5
5
  SHA512:
6
- metadata.gz: e1310e853aa476f18c422f2a6d049af4caef0bfd12a92daa91c95378d866362cada6d118411b15983f2503cba78e0ee600ded8cac58adbb0a3b1dd2253e2e7b7
7
- data.tar.gz: 861c805a212ab99a8cf1401ce43a0f413cba961467dab7a368e58d954aec25cb90bd44bd5e78b0c1cfbadaf3481caa01e90d5331d6b5d3ce5ba144399b8f92f7
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
- if (ajax) {
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hover_popover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Wargnier