Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

href for images #57

Closed
jay4linux opened this issue Oct 27, 2015 · 3 comments
Closed

href for images #57

jay4linux opened this issue Oct 27, 2015 · 3 comments

Comments

@jay4linux
Copy link

I am trying to wrap img sliders with href, but it is not working.
Here is the html

 <div id="slidr" style="display: inline">
            <span data-slidr="one"><a href="/documents/membership/newmemberhandbook.pdf"  target="_blank"><img  src="/images/sp_sliders/NewMember1.jpg"></a></span>
            <a data-slidr="two" href="/cig/home/#national-convention"><img  src="/images/sp_sliders/2015con.jpg"></a>
            <img data-slidr="three" src="/images/sp_sliders/leadership.jpg">
            <img data-slidr="four" src="/images/sp_sliders/PIZZABOX.jpg">
        </div>

Here is the javascript

<script>
    var s = slidr.create('slidr', {
        'controls': 'border',
        fade: false,
        keyboard: true,
        overflow: true,
        pause: false,
        theme: '#222',
        timing: { 'cube': '0.5s ease-in' },
        touch: true,
        transition: 'cube'
    });
    s.add('h', ['one', 'two', 'three', 'four', 'one']);
    s.auto();
</script>

Any suggestions. I love how simple this slider is to use

@jay4linux
Copy link
Author

I tried changing html to

<span data-slidr="one">
<img id="slidr1" src="/images/sp_sliders/NewMember1.jpg"
onclick="window.location.href='/documents/membership/newmemberhandbook.pdf'; return false;">
            </span>

No luck with that either.

@jay4linux jay4linux reopened this Oct 27, 2015
@medeaggd
Copy link

medeaggd commented Nov 19, 2018

Hopefully, you have long ago solved this, but I'm going to respond since it's still open.

  1. You should have the image sources begin with "." in HTML -> <img data-slidr="three" src="./images/sp_sliders/leadership.jpg">
  2. Not certain, but I think the slides need to be identified in the same media type - not sure you can combine the span, anchor, and image tags to all be the data-slidr's for this API.

@jay4linux
Copy link
Author

Yes, it has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants