Skip to content

Commit

Permalink
add CEFI detail feature with scrolltop and pdf link options
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaweh2 committed Jul 17, 2024
1 parent ab0d835 commit cb6fa46
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ <h2 class="headingCenter">1 minute CEFI</h2>
NOAA’s Climate, Ecosystems, and Fisheries Initiative (CEFI) focuses on creating an
operational ocean modeling and decision support system. This system will cover
<strong>various ocean regions, including the U.S. coastline,</strong> and provide actionable information to help
decision-makers adapt to changing ocean conditions. 🌊🐟🌎
decision-makers adapt to changing ocean conditions. 🌎🌊🐟
</p>
<button class="btn btn-psl" id="detailCEFIButton">More detail</button>
<button class="btn btn-psl" target="_blank" onclick="window.open('https://www.fisheries.noaa.gov/s3//2023-05/NOAA-Climate-Ecosystems-and-Fisheries-Initiative-Fact-Sheet.pdf', '_blank')" >
PDF version
</button>

<h2 class="headingCenter">Know the Regions</h2>
<div class="row">
Expand Down Expand Up @@ -67,7 +71,7 @@ <h2 class="headingCenter">Featured Resources</h2>

</br>
</br>
<div class="container">
<div class="container" id="detailCEFI">
<div class="row">
<div class="col-xs-12">
<h2 class="headingCenter">What is Climate, Ecosystems, and Fisheries Initiative (CEFI)?</h2>
Expand Down
12 changes: 12 additions & 0 deletions overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ $(document).ready(function() {
});
});

// slow animate transition to CEFI detail info
$(document).ready(function(){
$("#detailCEFIButton").click(function() {
$('html, body').animate({
scrollTop: $("#detailCEFI").offset().top
}, 1000);
});
});

// function for create option for general options
function chooseDefaultRegion(selectClass,defaultValue) {
Expand All @@ -21,3 +29,7 @@ function chooseDefaultRegion(selectClass,defaultValue) {
elms[i].value = defaultValue
}
};




0 comments on commit cb6fa46

Please sign in to comment.