tags:

views:

190

answers:

2

Can anyone help?

I am using the fantastic jQuery 'Anything Slider' by CSS Tricks. I can't work out how to link directly to slides from static links.

It is mentioned as a option (see below) but my knowledge of jQuery is very limited.

"Target the link using and ID or Class (or whatever), and apply a click handler. Then call the plugin function and pass it a number of the slide you are trying to link to:"

I guess I'm looking for a demo, so I can see how this technique is used.

http://css-tricks.com/anythingslider-jquery-plugin/

A: 

look at the url and see how it changes: http://css-tricks.com/examples/AnythingSlider/#panel-4

The hash is the important bit!

matpol
+1  A: 

I think I understand your question, but just to make sure: You want to click on a link and have the slider go directly to, say, slide 5.

In this case, you would follow the example that they have listed on the plug-in page:

Your markup:

<p class="slide-jump">Click me to go to Slide #5!</p>

Your script:

$('p.slide-jump').click (
    function() {
        $('.anythingSlider').anythingSlider(5);
    }
);
saibot
This works a treat! Thank you for your response. This website is fantastic :)
Stephen Meehan