{"id":13500729,"url":"https://github.com/peachananr/shuffle-images","last_synced_at":"2025-03-29T07:31:28.690Z","repository":{"id":17293855,"uuid":"20064235","full_name":"peachananr/shuffle-images","owner":"peachananr","description":"The Simplest Way to shuffle through images in a Creative Way","archived":false,"fork":false,"pushed_at":"2020-05-08T01:17:04.000Z","size":856,"stargazers_count":212,"open_issues_count":4,"forks_count":45,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-31T19:37:24.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://peachananr.github.io/shuffle-images/demo/shuffle-images_demo.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peachananr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T14:32:44.000Z","updated_at":"2024-03-25T20:38:04.000Z","dependencies_parsed_at":"2022-09-23T11:55:42.481Z","dependency_job_id":null,"html_url":"https://github.com/peachananr/shuffle-images","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peachananr%2Fshuffle-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peachananr%2Fshuffle-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peachananr%2Fshuffle-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peachananr%2Fshuffle-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peachananr","download_url":"https://codeload.github.com/peachananr/shuffle-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246155994,"owners_count":20732355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:01:11.941Z","updated_at":"2025-03-29T07:31:27.983Z","avatar_url":"https://github.com/peachananr.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Animations","Animations [🔝](#readme)","动画"],"sub_categories":["Other","其它"],"readme":"#Shuffle Images by Pete R.\nShuffle Images let you display and shuffle multiple images by moving cursor around or several other ways to trigger.This plugin is perfect for when you want to save space while allowing users to take a peak at what other images are related to the one displayed. It can also be used to create an interactive animation on multiple static images at once.\n\n\nCreated by [Pete R.](http://www.thepetedesign.com), Founder of [Travelistly](http://www.travelistly.com) and [BucketListly](http://www.bucketlistly.com)\n\nLicense: [Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/deed.en_US)\n\n\n## Demo\n[View demo](http://peachananr.github.io/shuffle-images/demo/shuffle-images_demo.html)\n\n## Compatibility\nModern browsers such as Chrome, Firefox, and Safari on desktop have been tested. Not tested on IE. Since the nature of this plugin requires mouse input, it may not work as expected on mobile.\n\n## Basic Usage\nTo use this plugin, simply include the latest jQuery library (preferably version 2.0.0 or higher) together with `jquery.shuffle-images.js` into your document's `\u003chead\u003e` follow by an HTML markup as follows:\n\n````html\n\u003cbody\u003e\n  ..\n  \u003cdiv class=\"shuffle-me\"\u003e\n    \u003cimg src=\"images/1.jpg\"\u003e\n    \u003cimg src=\"images/2.jpg\"\u003e\n    \u003cimg src=\"images/3.jpg\"\u003e\n    ..\n  \u003c/div\u003e\n  ..\n\u003c/body\u003e\n\n````\nMake sure all the images you want to shuffle are wrapped within a container where we will call the function on.\n\nOnce that is set up, simply call the plugin like this:\n\n````javascript\n $(\".shuffle-me\").shuffleImages({\n   trigger: \"imageMouseMove\",     // Choose which type of trigger you want here. Available options are \"imageMouseMove\", \"imageHover\", \"documentMouseMove\", and \"documentScroll\". \"imageMouseMove\" will trigger when your mouse over the image and move your cursor. \"imageHover\" will trigger when you mouse over without moving your cursor. \"documentMouseMove\" will trigger when cursor is being moved anywhere on the page. \"documentScroll\" will trigger when you scroll the page. The default value is \"imageMouseMove\"\n   triggerTarget: false,          // For \"imageMouseMove\", and \"imageHover\" only, you can set which element to trigger the image shuffle when mouse over. For example, if you want a container \".main\" to trigger an image shuffle instead of the image itself, put $(\".main\") for this option. Default value is false.\n   mouseMoveTrigger: 50,          // For \"imageMouseMove\" only, you can set how many pixels you have to move in order to trigger one image shuffle. The lower the faster. The default value is 50.\n   hoverTrigger: 200,             // For \"imageHover\" only, you can set how long you have to hover the image until it shuffles to other images. The option accepts milliseconds without unit. The default value is 200.\n   scrollTrigger: 100,          // For \"documentScroll\" only, you can set how many pixels you have to scroll to see the image shuffle. The default value is 100.\n   target: \"\u003e img\"              // In case you have a complete HTML structure, you can set your own custom selector to your images here. The default value is \"\u003e img\" which means images that are directly under the \"shuffle-me\" will be used to shuffle.\n });\n````\nWith the setup above, your images will be shuffled when you mouse over that particular image and you move around your cursor more than 50 pixels away from previous location.\n\n## Markups\nYou can individually assign each shuffle with its own trigger timing. Available markup are:\n\n\n### data-si-mousemove-trigger\nYou can define a custom mouseMoveTrigger option with this data attribute:\n\n````html\n  \u003cdiv class=\"shuffle-me\" data-si-mousemove-trigger=\"100\"\u003e\n    \u003cimg src=\"images/1.jpg\"\u003e\n    ...\n  \u003c/div\u003e\n````\n\n### data-si-hover-trigger\nYou can define a custom hoverTrigger option with this data attribute:\n\n````html\n  \u003cdiv class=\"shuffle-me\" data-si-hover-trigger=\"1000\"\u003e\n    \u003cimg src=\"images/1.jpg\"\u003e\n    ...\n  \u003c/div\u003e\n````\n\n### data-si-scroll-trigger\nYou can define a custom scrollTrigger option with this data attribute:\n\n````html\n  \u003cdiv class=\"shuffle-me\" data-si-scroll-trigger=\"200\"\u003e\n    \u003cimg src=\"images/1.jpg\"\u003e\n    ...\n  \u003c/div\u003e\n````\n\nNow your users can see several images while moving their cursor when they interact with the first image on your website. \n\nIf you want to see more of my plugins, visit [The Pete Design](http://www.thepetedesign.com/#plugins), or follow me on [Twitter](http://www.twitter.com/peachananr) and [Github](http://www.github.com/peachananr).\n\n## Other Resources\n- Tutorial (Coming Soon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeachananr%2Fshuffle-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeachananr%2Fshuffle-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeachananr%2Fshuffle-images/lists"}