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

using hash links to access certain slide, the play continue and you cant select that slide again #28

Closed
alhoseany opened this issue Dec 11, 2012 · 5 comments
Labels

Comments

@alhoseany
Copy link

hi, lets say you access the slide page using the url with hash "#2".
this loads the slideshow and takes you to slide number 3.
the problem here that the slideshow starts playing again and when you try to click on the pagination item corresponds to the 3rd slide , nothing happen. you cant go back to slide 3 unless you wait for it to come in its order of playing.

@nicinabox
Copy link
Owner

Ah, interesting. Yes. The reason is that the url still has that hash, so when you click on that item again, it still things it's on #2 according to the url. Definitely a bug. Nice catch.

@alhoseany
Copy link
Author

i found a solution to this. just will stop the slideshow when the slideshow is accessed by hash url.

  start = function() {
    var index;
    if (size > 1) {
      if (location.hash) {
        index = location.hash.replace(/^#/, '');
              animate(index);     // animate only
      } else {
        index = (first_load ? 0 : "next");
              animate(index);    // animate and play
              return play();
      }

    } else {
      $container.fadeIn('fast');
      return $("." + $.fn.superslides.options.nav_class).hide();
    }
  };

@alhoseany
Copy link
Author

another solution would be to check for the current slide when the pagination item is clicked.

@nicinabox
Copy link
Owner

This is already being reworked in the 0.5-wip branch. I'll take care of this bug there.

@nicinabox
Copy link
Owner

Fixed in 0.5. Shooting to release this weekend.

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

No branches or pull requests

2 participants