Created
August 8, 2014 10:13
-
-
Save Barrytron1983/468dbcbb39ac3084bf2e to your computer and use it in GitHub Desktop.
Revolution Slider outside buttons - controls slides outside of slider :: Wordpress/Revolution Slider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Header script - ('revapi3' being the id of the slider) */ | |
<!-- Slider points linking to slides --> | |
<script type="text/javascript"> | |
var revapi3; | |
jQuery(document).ready(function() { | |
revapi3 = jQuery('.tp-banner').revolution( | |
{ | |
delay:9000, | |
startwidth:1170, | |
startheight:500, | |
hideThumbs:10 | |
}); | |
//######################################## | |
// - API HANDLING - | |
//######################################## | |
// bind to button click | |
jQuery("button").click(apiHandler) | |
function apiHandler(e) { | |
switch (e.currentTarget.id) { | |
case "show1": | |
revapi3.revshowslide(1); | |
break; | |
case "show2": | |
revapi3.revshowslide(2); | |
break; | |
case "show3": | |
revapi3.revshowslide(3); | |
break; | |
case "show4": | |
revapi3.revshowslide(4); | |
break; | |
case "show5": | |
revapi3.revshowslide(5); | |
break; | |
} | |
return false; | |
} | |
}); //ready | |
</script> | |
*********** | |
/*Body html - attach id of "show1" or whatever to button. Must have "button_type" seems to not work on active divs*/ | |
<div style="width: 20%; float: left; text-align: left; padding-left: 1%; border-width:0px 0px 0px 0px; border-style: solid; border-color: #fff;"><div style="width: 80%; float: left; padding: 0px 10px; color: #fff;"><button type="button" class="pointer_input" id="show1">One Vendor One System<br>enviroMANAGER.</button></div></div> | |
<div style="width: 20%; float: left; text-align: left; padding-left: 1%; border-width:0px 0px 0px 1px; border-style: solid; border-color: #fff;"><div style="width: 80%; float: left; padding: 0px 10px; color: #fff;"><button type="button" class="pointer_input" id="show2">Designed by QEHS<br> Professionals</button></div></div> | |
<div style="width: 20%; float: left; text-align: left; padding-left: 1%; border-width:0px 0px 0px 1px; border-style: solid; border-color: #fff;"><div style="width: 80%; float: left; padding: 0px 10px; color: #fff;"><button type="button" class="pointer_input" id="show3">Integrated workflow<br>between modules.</button></div></div> | |
<div style="width: 20%; float: left; text-align: left; padding-left: 1%; border-width:0px 0px 0px 1px; border-style: solid; border-color: #fff;"><div style="width: 80%; float: left; padding: 0px 10px; color: #fff;"><button type="button" class="pointer_input" id="show4">Aggregated Data<br>Dashboard Reporting.</button></div></div> | |
<div style="width: 20%; float: left; text-align: left; padding-left: 1%; border-width:0px 0px 0px 1px; border-style: solid; border-color: #fff;"><div style="width: 80%; float: left; padding: 0px 10px; color: #fff;"><button type="button" class="pointer_input" id="show5">Manage the environment<br> in which you operate<br></button></div></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment