{"id":18539131,"url":"https://github.com/simov/simplr-fade","last_synced_at":"2025-05-15T02:30:39.913Z","repository":{"id":6303339,"uuid":"7538054","full_name":"simov/simplr-fade","owner":"simov","description":"jQuery Slider Plugin","archived":false,"fork":false,"pushed_at":"2017-05-06T08:11:57.000Z","size":363,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-26T04:21:37.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://simov.github.io/simplr-fade/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-10T09:24:29.000Z","updated_at":"2021-04-23T12:46:38.000Z","dependencies_parsed_at":"2022-09-13T21:51:10.400Z","dependency_job_id":null,"html_url":"https://github.com/simov/simplr-fade","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/simov%2Fsimplr-fade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Fsimplr-fade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Fsimplr-fade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Fsimplr-fade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simov","download_url":"https://codeload.github.com/simov/simplr-fade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239255308,"owners_count":19608251,"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-11-06T19:46:28.263Z","updated_at":"2025-02-17T08:13:52.127Z","avatar_url":"https://github.com/simov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# simplr-fade / [Playground] / [Multiple]\n\n## HTML\n\nYou can use whatever html structure you want to as long as there is a container with items in it:\n\n```html\n\u003cdiv class=\"fader\"\u003e\n  \u003cdiv class=\"item\"\u003e\n    \u003cp\u003eitem 1\u003c/p\u003e\n  \u003c/div\u003e\n  \u003c!-- ... --\u003e\n  \u003cdiv class=\"item\"\u003e\n    \u003cp\u003eitem N\u003c/p\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nor a list if you want to:\n\n```html\n\u003cul class=\"fader\"\u003e\n  \u003cli\u003eitem 1\u003c/li\u003e\n  \u003c!-- ... --\u003e\n  \u003cli\u003eitem N\u003c/li\u003e\n\u003c/ul\u003e\n```\n\n## CSS\n\nThe container must be `relative` and the items must be `absolute`:\n\n```css\n/*required*/\n.fader { position: relative; }\n.fader .item { position: absolute; }\n```\n\nThe items should have a **non transparent background** and their size should be equal to the size of the container, in order to *hide* them one under another.\n\n\n## JavaScript\n\n```js\n$('.fader .item').srFade()\n```\n\n\n## Properties\n\n### duration\n\nAnimation duration (in milliseconds: 1000 = 1 second, 400 = 0.4 of a second):\n\n```js\n$('.fader .item').srFade({duration: 600})\n```\n\n### delay\n\nTime to wait between each step when `auto` is on (in milliseconds: 1000 = 1 second, 400 = 0.4 of a second):\n\n```js\n$('.fader .item').srFade({delay: 4000})\n```\n\n### easing\n\nSpecify an easing function to use for the transition between items. When using the `animate` property the [jQuery Easing][easing] plugin must be included inside your page. When using the `css3` property no additional plugin is required.\n\n```js\n$('.fader .item').srFade({\n    easing: 'easeOutSine'\n})\n```\n\n### auto\n\nBy default simplr-fade cycles through the items automatically:\n\n```js\n$('.fader .item').srFade({auto: false})\n```\n\n### animate\n\nPass css properties to animate (like in the default jQuery animate method):\n\n```js\n$('.fader .item').srFade({\n  animate: { width: 0, height: 0, top:500/2, left:800/2, opacity:0.5 }\n})\n```\n\n### effect\n\nSpecify a predefined animation from the [jQuery UI Effect][ui-effects] plugin. Note that it must be included inside your page before that:\n\n```js\n$('.fader .item').srFade({\n  effect: 'puff'\n})\n```\n\nAppropriate effects to use from the *jQuery UI Effect* plugin are: *blind, clip, drop, explode, fade, fold, puff*.\n\n### css3\n\nSpecify a predefined animation from [animate.css]. Note that it must be included inside your page before that:\n\n```js\n$('.fader .item').srFade({\n    css3: 'flipOutX'\n})\n```\n\nThe *animate*, *effect* and *css3* properties cannot be used simultaneously.\n\n\n## Events\n\n#### onFade\n\nRaised just before the animation starts. It receives the item's `index` that is about to be animated. That's the place to update the navigation of the fader (if there is one).\n\n```js\n$('.fader .item').srFade({\n  onFade: function (index) {\n    $('.fader-nav a').removeClass('active').eq(index).addClass('active')\n  }\n})\n```\n\n#### onAfterFade\n\nRaised after the animation of the current item has completed. It receives the current item's `index`. Can be used to start secondary animations within the fader items.\n\n```js\n$('.fader .item').srFade({\n  onAfterFade: function (index) {\n    $('.fader .item').eq(index).find('p').slideDown()\n  }\n})\n```\n\n## Methods\n\nFirst you need a simplr-fade instance:\n\n```js\nvar fader = $('.fader .item').srFade({\n  // ... properties and events\n})\n```\n\n### prev\n\nNavigate back and forth between your items, usefull for navigation arrows:\n\n```js\n$('.prev').click(function () {\n  fader.prev()\n  return false\n})\n```\n\n### next\n\n```js\n$('.next').click(function () {\n  fader.next()\n  return false\n})\n```\n\n### fadeTo\n\nNavigate to specific item, usefull for navigation dots:\n\n```js\n$('.fader-nav a').click(function () {\n  fader.fadeTo($('.fader-nav a').index(this))\n  return false\n})\n```\n\n### stop\n\nThe automatic transition between items can be stopped temporarily and restarted back later on. Usefull when hovering over the fader:\n\n```js\n$('.fader .item').mouseover(function () {\n  fader.stop()\n})\n```\n\n### start\n\n```js\n$('.fader .item').mouseout(function () {\n  fader.start()\n})\n```\n\n  [Playground]: https://simov.github.io/simplr-fade/\n  [Multiple]: https://simov.github.io/simplr-fade/multiple/\n  [easing]: http://gsgd.co.uk/sandbox/jquery/easing/\n  [ui-effects]: http://docs.jquery.com/UI/Effects\n  [animate.css]: https://daneden.github.io/animate.css/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimov%2Fsimplr-fade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimov%2Fsimplr-fade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimov%2Fsimplr-fade/lists"}