volt 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/volt/models/url.rb +6 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1bbb48a5934f94dbcf9792f874a094a7676afcaa
4
- data.tar.gz: 496c0ace68c39e79698db2601f741fc576cb5282
3
+ metadata.gz: 0ea59d20f4388a14fc9642a6ee3c57884cb04984
4
+ data.tar.gz: a4468c1100c9a6103fe5f8373f948fc115d7c187
5
5
  SHA512:
6
- metadata.gz: 1fafa2560016c23ac530de15cf45eacf5ab7c1fb5ce08c3eeb3175fe40ee23aaa5bb09dd455af9c493555aa01b68cc207558e566a7f235bd5449864902deb86a
7
- data.tar.gz: d14a5db4c01dfba85b4c4bb5a841bc173c16fb4382ab91b2bc662f17e6c893372dde4d25a14c49ba109563d16f0a0c1d3661e683574287715a88ac3baed2ae91
6
+ metadata.gz: 37a28c731eeb99d9955d52859f82cff457e4d480bc6dc2b6b2fd276388ccfaae416f69002d35030c332ff987a1d457bb95057a78f6db07b8b4f24c953c3f4989
7
+ data.tar.gz: 18d0725eda9d3ca81e96555a951b5967cf59c8b64323443ff7102b1b7824b959c6679be4ea7552744f5c34cc580dea248c2c9165431324c16961dfb02ec4e292
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
@@ -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 = $('a[name="' + this.fragment + '"]');
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.3
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-15 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor