{"id":89,"date":"2006-09-09T18:42:27","date_gmt":"2006-09-10T03:42:27","guid":{"rendered":"http:\/\/yvod.com\/ulan\/slider-code"},"modified":"2006-09-09T18:42:27","modified_gmt":"2006-09-10T03:42:27","slug":"slider-code","status":"publish","type":"post","link":"http:\/\/yvod.com\/ulan\/slider-code\/","title":{"rendered":"Slider code"},"content":{"rendered":"<p>Reworked a bit of slider code from <a href=\"http:\/\/45royale.com\" target=_blank\">45royale.com<\/a>. We are using it on our new site so I figured I would share with all =)<\/p>\n<p>&#45;&#45;&#45;&#45;<\/p>\n<p><strong>1) Grab <a href=\"http:\/\/prototype.conio.net\" target=_blank\">http:\/\/prototype.conio.net<\/a> and <a href=\"http:\/\/script.aculo.us\" target=_blank\">http:\/\/script.aculo.us<\/a><\/strong> <\/p>\n<p><strong>2) Make sure effects.js has the Combo Variables code [displayed below]<\/strong><\/p>\n<p><strong>3) Add the css code to your css file<\/strong><\/p>\n<p><strong>4) Add slider code to HTML files<\/strong><\/p>\n<p><strong>5) Add a button image to your media folder<\/strong><\/p>\n<p>&#45;&#45;&#45;&#45;<\/p>\n<p>\/*<br \/>\n&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;<br \/>\nCombo Variables code<br \/>\n&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;<br \/>\n*\/<\/p>\n<p>Effect.OpenUp = function(element) {<br \/>\n&nbsp; element = $(element);<br \/>\n&nbsp; new Effect.BlindDown(element, arguments[1] || {});<br \/>\n}<\/p>\n<p>Effect.CloseDown = function(element) {<br \/>\n&nbsp; element = $(element);<br \/>\n&nbsp; new Effect.BlindUp(element, arguments[1] || {});<br \/>\n}<\/p>\n<p>Effect.Combo = function(element) {<br \/>\n&nbsp; element = $(element);<br \/>\n&nbsp; if(element.style.display == &#8216;none&#8217;) {<br \/>\n&nbsp; &nbsp; new Effect.OpenUp(element, arguments[1] || {});<br \/>\n&nbsp; }else {<br \/>\n&nbsp; &nbsp; new Effect.CloseDown(element, arguments[1] || {});<br \/>\n&nbsp; }<br \/>\n}<\/p>\n<p>&#45;&#45;&#45;&#45;<\/p>\n<p>\/*<br \/>\n&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;<br \/>\nslider css code<br \/>\n&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;<br \/>\n*\/<\/p>\n<p>.slider {<br \/>\n&nbsp; width: 629px;<br \/>\n&nbsp; margin: 0px 0px 0px 0px;<br \/>\n&nbsp; padding: 7px 7px 0px 7px;<br \/>\n&nbsp; border: 1px solid #999999;<\/p>\n<p>}<\/p>\n<p>.slider a {<br \/>\n&nbsp; margin: 0px 0px 0px 0px;<br \/>\n&nbsp; padding: 0px 0px 0px 0px;<br \/>\n&nbsp; background: #ffffff url(\/media\/new\/plus&#45;button.png) no&#45;repeat center right;<br \/>\n&nbsp; min&#45;height: 25px;<br \/>\n&nbsp; \/* border: 1px solid #999999; *\/<br \/>\n&nbsp; display: block;<br \/>\n&nbsp; color: #606060;<br \/>\n}<\/p>\n<p>.slider a:hover {<br \/>\n&nbsp; color: #999999;<br \/>\n}<br \/>\n&#45;&#45;&#45;&#45;<\/p>\n<p>&lt;!&#45;&#45; html code &#45;&#45;><\/p>\n<p>&nbsp; &lt;div class=&#8221;slider&#8221;><br \/>\n&nbsp;<br \/>\n&nbsp; &nbsp; &lt;h5>&lt;a href=&#8221;javascript:Effect.Combo(&#8216;slide&#45;content&#8217;, {duration: .5});&#8221;><br \/>\n&nbsp; &nbsp; Click to slide&lt;\/a>&lt;\/h5><br \/>\n&nbsp; &nbsp;<br \/>\n&nbsp; &nbsp; &lt;div id=&#8221;slide&#45;content&#8221; style=&#8221;display:none;&#8221;><br \/>\n&nbsp; &nbsp; &nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; Content you want to slide<br \/>\n&nbsp; &nbsp;<br \/>\n&nbsp; &nbsp;  &lt;\/div> &lt;!&#45;&#45; id=&#8221;slide&#45;content&#8221; &#45;&#45;><br \/>\n&nbsp;<br \/>\n&nbsp;  &lt;\/div> &lt;!&#45;&#45; class=&#8221;slider&#8221; &#45;&#45;><\/p>\n<p>&#45;&#45;&#45;&#45;<\/p>\n<p>Button &#45;&#45;> <img decoding=\"async\" src=\"\/media\/new\/plus&#45;button.gif\"\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reworked a bit of slider code from http:\/\/prototype.conio.net and<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-code-computers","category-yvod"],"_links":{"self":[{"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":0,"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"wp:attachment":[{"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yvod.com\/ulan\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}