metafizzy / flickity-fullscreen

Enable fullscreen view for Flickity carousels
46 stars 17 forks source link

hash link to fullscreen #24

Open nam-co opened 5 years ago

nam-co commented 5 years ago

Hi desandro, I was wondering if its possible to link a specific image in fullscreen, so when click, it opens the fullscreen and scrolls to the desire img, also is it possible to link to a image with out the #photoX on the url?

<a class="comment_photo_fullscreen" href="#carousel-cell2">View cell 2</a>

<img class="carousel-image" id="carousel-cell2"....>

  $(".comment_photo_fullscreen").click(function() {
    $carousel.flickity('viewFullscreen');
  });

Appreciate the help

desandro commented 5 years ago

See flickity-hash for using hash links for specific cells.

As for opening in fullscreen Flickity, you'll have to do that with JS, like you posted.

nam-co commented 5 years ago

Hi D, thanks for the response, I did the hash (included in the above code), but is not working with the open fullscreen and scroll to desire image.. or the hash has to use a div around each image?

Also, is it possible to has link with out the #id in the url? maybe hash with js

Thanks

desandro commented 5 years ago

I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.

nam-co commented 5 years ago

Hi D, can I send you a video?

desandro commented 5 years ago

An actual website that demonstrates the issue is necessary as it allows me to debug the code.