JQuery slideshow with dynamic URLs for linking directly to an image in slideshow
Does anyone know if there is a jquery slideshow script out there that appends parameters to the URL based on what image you are looking at in the slideshow? A client is worried that a page of featured images that is displayed in a slideshow won't allow users to direct link开发者_C百科 to a certain image, or share a URL directly to that image in the slideshow. I've not seen any scripts that do this dynamically, since they just change the visibility of hidden divs on the page. Thanks!
Building jQuery plugins is probably simpler than you think. Find your favourite slideshow plugin... one that allows you to jump to a particular slide (I'm using the goTo parameter in this example to do that), then modify the hash part of the url in the onChange:
jQuery.fn.urlSlideshow = function ()
{
$(this).favouriteSlideShowPlugin({
onChange: function () {/* modify hash part of url to name of slide here */},
goTo: /* get hash part of url here */
});
};
精彩评论