Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript anythingslider: Hashtags as panel name

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31332
    DerekM
    Member

    Hey there,

    I’m having a lot of fun with the anythingSlider; much thanks to all involved. Here’s my issue:

    I like that this slider has the ability to display the individual panels in the URL but I’d like to be able to replace the default panel hashtag (ex: #panel2-3) with the name of my tabs (ex: #image). Take a look at the slider2 demo for reference.

    Again, to clarify: I’d like to change hxxp://css-tricks.com/examples/AnythingSlider/#panel2-3 to hxxp://css-tricks.com/examples/AnythingSlider/#image.

    I think that this would be a bit better for SEO purposes but I haven’t been able to figure this out yet. Anyone else have a clue?

    #64639
    DerekM
    Member

    I’ve narrowed it down to line 483 in anythingslider.js

    window.location.hash = (h.indexOf(s) > 0) ? h.replace(base.regex, s + n) : h + "&" + s + n;

    What I need to do now is figure out how to strip the individual values from

    base.options.navigationFormatter

    (which can be found at around line 240) and then apply those particular single values to the above code to match the navigation tabs text.

    I’m still learning jquery but I think I’m on the right track. Anyone else have input or is this a bit more difficult than I’m thinking?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.