anselmh / css-slider

[DEPRECATED] A mostly CSS based slider which is only enhanced by JavaScript and is hardware accellerated by default. Not actively maintained.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent jump to hash

anselmh opened this issue · comments

As I said on G+, checkout how I did it in Gallery.css

@benschwarz you use empty elements in your markup set to display: none;, right?
I personally don't like to use unnecessary elements in markup…

Sure, but if you're using :target then you can't cancel the event with script.
It's the only way I could discover to use target and prevent scrolling. 

On Thu, May 23, 2013 at 8:23 PM, Anselm Hannemann <notifications@github.com="mailto:notifications@github.com">> wrote:
@benschwarz you use empty elements in your markup set to display: none;, right?
I personally don't like to use unnecessary elements in markup…


Reply to this email directly or view it on GitHub.

Well, I'll consider what to do on that issue. Thanks for the heads-up with your solution! Appreciated! :)

Ping me when you figure it out, love to see what you come up with :-)

On Thu, May 23, 2013 at 8:31 PM, Anselm Hannemann <notifications@github.com="mailto:notifications@github.com">> wrote:
Well, I'll consider what to do on that issue. Thanks for the heads-up with your solution! Appreciated! :)


Reply to this email directly or view it on GitHub.

I've played around with several ideas but couldn't find a solution with pure CSS. I think @benschwarz is right, there isn't a possibility to do so.
I added a variation of Ben's solution which adds a span with the ID within the list of slides.