colorbox-rails 0.0.16 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,9 +7,14 @@
7
7
  //= require_tree .
8
8
 
9
9
  (function($){
10
+ // injecting colorbox nodes when using turbolinks
11
+ $colorboxOverlay = ''
12
+ $colorboxBox = ''
10
13
 
11
- $(document).ready(function() {
12
-
14
+ $(document).on('ready', function() {
15
+ $colorboxOverlay = $("#cboxOverlay")
16
+ $colorboxBox = $("#colorbox")
17
+
13
18
  $(document).on('click', '[data-colorbox="true"]', function(e) {
14
19
  e.preventDefault();
15
20
 
@@ -46,5 +51,10 @@
46
51
  opacity: 0.5
47
52
  });
48
53
  });
54
+
55
+ $(document).on('page:change', function() {
56
+ $colorboxOverlay.appendTo("body")
57
+ $colorboxBox.appendTo("body")
58
+ });
49
59
 
50
60
  }) (jQuery);
@@ -1,3 +1,3 @@
1
1
  module ColorboxRails
2
- VERSION = "0.0.16"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorbox-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-06-30 00:00:00.000000000 Z
15
+ date: 2013-07-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails