liamloveslearning Posted November 18, 2008 Share Posted November 18, 2008 hi everyone, im having trouble understanding how this gallery works, it can be controlled by the keys on your keyboard and also the click of the arrow, how is it built and is their any tuts? any helps appreciated, thanks http://www.lucashirata.com.br/work/pcplus Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 18, 2008 Share Posted November 18, 2008 im looking into it i know its all javascript but im trying to get it all toghethor Quote Link to comment Share on other sites More sharing options...
liamloveslearning Posted November 18, 2008 Author Share Posted November 18, 2008 ahh cool thanks, Ill have a google round Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 18, 2008 Share Posted November 18, 2008 bleh js the first post is your body section of the page <body onResize="window.location.href = window.location.href;"> <div id="carousel_work"> <div id="total_work"> <div class="container_work"> <div class="container"> <ul> <li> <div class="job_description"> <div class="job_image"> <!--Image goes here --> </div> <p><!-- you can put text about the image here --> </div> </li> <li> <div class="job_description"> <div class="job_image"> <!--Image goes here --> </div> <p><!-- you can put text about the image here --> </div> </li> <li> <div class="job_description"> <div class="job_image"> <!--Image goes here --> </div> <p><!-- you can put text about the image here --> </div> </li> </ul> </div> </div> </div> <div id="job_navigation"> <div class="next_button"></div> <div class="previous_button"></div> </div> </div> <script type="text/javascript"> // <![CDATA[ function runTest() {hCarousel = new UI.Carousel("carousel_work");} Event.observe(window, "load", runTest); // ]]> document.observe('keydown', respondToClick); function respondToClick(event) { var key = event.which || event.keyCode; switch (key) { case Event.KEY_RIGHT: $("job_navigation").down(".next_button").clickHandler() break; case Event.KEY_LEFT: $("job_navigation").down(".previous_button").clickHandler() break; case Event.KEY_UP: window.location = $$(".next_job")[0].down("a").href break; case Event.KEY_DOWN: window.location = $$(".previous_job")[0].down("a").href break; } } </script> </body> these are you js files he used just move them over to your server as they are frameworks and such this goes in the head sectipon <script src="http://www.lucashirata.com.br/wp-content/themes/default/js/effects.js" type="text/javascript"></script> <script src="http://www.lucashirata.com.br/wp-content/themes/default/js/carousel.js" type="text/javascript"></script> <script src="http://www.lucashirata.com.br/wp-content/themes/default/js/shortcut.js" type="text/javascript"></script> like i said make sure you dont hotlink these scripts make sure you put them on your server and change address Quote Link to comment Share on other sites More sharing options...
liamloveslearning Posted November 18, 2008 Author Share Posted November 18, 2008 ah cool, thanks a lot Can i just ask would this not be breaking any "laws" or CC attributes ? thanks again Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 18, 2008 Share Posted November 18, 2008 no all three scripts are freely distrubuted on a small mistake dont use shortcut.js use http://www.lucashirata.com.br/wp-content/themes/default/js/prototype.js i got the wrong link copied but this is all legal due to its license on the top of all three js files.. only way it is illegal would be to directly link them from his site.. Quote Link to comment Share on other sites More sharing options...
liamloveslearning Posted November 18, 2008 Author Share Posted November 18, 2008 brilliant!, thanks great help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.