volt 0.6.3 → 0.6.4
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/VERSION +1 -1
- data/lib/volt/models/url.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ea59d20f4388a14fc9642a6ee3c57884cb04984
|
|
4
|
+
data.tar.gz: a4468c1100c9a6103fe5f8373f948fc115d7c187
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37a28c731eeb99d9955d52859f82cff457e4d480bc6dc2b6b2fd276388ccfaae416f69002d35030c332ff987a1d457bb95057a78f6db07b8b4f24c953c3f4989
|
|
7
|
+
data.tar.gz: 18d0725eda9d3ca81e96555a951b5967cf59c8b64323443ff7102b1b7824b959c6679be4ea7552744f5c34cc580dea248c2c9165431324c16961dfb02ec4e292
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.4
|
data/lib/volt/models/url.rb
CHANGED
|
@@ -98,9 +98,13 @@ class URL
|
|
|
98
98
|
def scroll
|
|
99
99
|
if Volt.client?
|
|
100
100
|
if @fragment
|
|
101
|
-
# Scroll to anchor
|
|
101
|
+
# Scroll to anchor via http://www.w3.org/html/wg/drafts/html/master/browsers.html#scroll-to-fragid
|
|
102
102
|
%x{
|
|
103
|
-
var anchor = $('
|
|
103
|
+
var anchor = $('#' + this.fragment);
|
|
104
|
+
if (anchor.length == 0) {
|
|
105
|
+
anchor = $('*[name="' + this.fragment + '"]:first');
|
|
106
|
+
}
|
|
107
|
+
console.log('found anchor: ', anchor);
|
|
104
108
|
if (anchor && anchor.length > 0) {
|
|
105
109
|
$(document.body).scrollTop(anchor.offset().top);
|
|
106
110
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: volt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Stout
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-02-
|
|
11
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|