Skip to content

Instantly share code, notes, and snippets.

@jorgepedret
Created June 20, 2011 20:39
Show Gist options
  • Select an option

  • Save jorgepedret/1036522 to your computer and use it in GitHub Desktop.

Select an option

Save jorgepedret/1036522 to your computer and use it in GitHub Desktop.
VouchFor HIW Script
<script>
$(".create, #create-link").click(function() {
$(".step-wrapper .col").removeClass('selected'); $(".create").addClass('selected');
$(".details, #hiw-intro").hide(); $("#hiw-create").show();
$('html, body').animate({scrollTop: 300}, 200);
return false;
});
$(".share, #share-link").click(function() {
$(".step-wrapper .col").removeClass('selected'); $(".share").addClass('selected');
$(".details, #hiw-intro").hide(); $("#hiw-share").show();
$('html, body').animate({scrollTop: 300}, 200);
//scrollTop();
return false;
});
$(".refer, #refer-link").click(function() {
$(".step-wrapper .col").removeClass('selected'); $(".refer").addClass('selected');
$(".details, #hiw-intro").hide(); $("#hiw-refer").show();
$('html, body').animate({scrollTop: 300}, 200);
//scrollTop();
return false;
});
$(".reward, #reward-link").click(function() {
$(".step-wrapper .col").removeClass('selected'); $(".reward").addClass('selected');
$(".details, #hiw-intro").hide(); $("#hiw-reward").show();
$('html, body').animate({scrollTop: 300}, 200);
//scrollTop();
return false;
});
$(".results, #results-link").click(function() {
$(".step-wrapper .col").removeClass('selected'); $(".results").addClass('selected');
$(".details, #hiw-intro").hide(); $("#hiw-results").show();
$('html, body').animate({scrollTop: 300}, 200);
//scrollTop();
return false;
});
$(function(){
var target_section = document.location.hash+'-link';
$(target_section).click();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment