Skip to content

Instantly share code, notes, and snippets.

@jessgusclark
Last active September 20, 2017 16:13
Show Gist options
  • Save jessgusclark/f3d37ea6f583f1953557654d997e471b to your computer and use it in GitHub Desktop.
Save jessgusclark/f3d37ea6f583f1953557654d997e471b to your computer and use it in GitHub Desktop.
Javascript code to hide content on 'sub pages' for Community Funded. Requires JQuery (kinda)
$(document).ready(function(){
if ( window.location.href.indexOf("cfpage=") !== -1 ){
// select the classes(or IDs) here that should be hidden
$(".images").hide();
$(".intro-text").hide();
}
});
@jessgusclark
Copy link
Author

Change lines 4 & 5 to whatever classes you want hidden when you are not on the index page.

An example of this code can be found on UNC's Crowdfunding website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment