Cargo home Twitter Devlog

Showing/hiding the Header

Last Updated: Nov 28, 2012 08:05PM PST
If you have an especially large header, you may want to hide it whenever a project/page is open on your website. You can use this script tag in your Custom HTML to show/hide the header image depending on whether there is a project loaded or not:
 <script type="text/javascript">
$(document).ready(function(){
    if ( Cargo.Location.IsDirectLink() ){
         $(".header_img").hide();
    }
});

$(document).bind("projectLoadComplete", function(e, pid){
    $(".header_img").hide();
});

$(document).bind("projectCloseComplete", function(container){
    $(".header_img").show();
});
</script> 
tickets@cargocollective.com
http://assets2.desk.com/
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
Invalid characters found
/customer/en/portal/articles/autocomplete