Skip to content

Commit

Permalink
appended the element id in front of the about link and added check fo…
Browse files Browse the repository at this point in the history
…r url

* scroll to the faq when clicked on the why support link in the footer

* changed the time of animation

* appended the element id in front of the about link and added check for url

* used slideDown instead to css display block
  • Loading branch information
zainvrk authored Jun 16, 2023
1 parent 7b3d202 commit 83f7dcc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions mitx/lms/static/js/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ $(document).ready(function() {
$('.accordion-title').removeClass('active');
$('.accordion-content').slideUp(400, "swing");
});

if(window.location.href.includes("why_support_mit_faq")){
$("#why_support_mit_faq .accordion-title").addClass("active");
$("#why_support_mit_faq .accordion-content").slideDown(400, "swing");
}

});
2 changes: 1 addition & 1 deletion mitx/lms/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<li><a href="${marketing_link('ABOUT')}">${_("About")}</a></li>
<li><a href="https://accessibility.mit.edu/">${_("Accessibility")}</a></li>
<li><a href="${marketing_link('COURSES')}">${_("All Courses")}</a></li>
<li><a target="_blank" href="${marketing_link('DONATE')}">${_("Why Support MIT Open Learning?")}</a></li>
<li><a href="${marketing_link('ABOUT')}#why_support_mit_faq">${_("Why Support MIT Open Learning?")}</a></li>
<li><a href="mailto:&#109;&#105;&#116;&#111;&#108;&#108;&#045;&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#064;&#109;&#105;&#116;&#046;&#101;&#100;&#117;">${_("Help")}</a></li>
</ol>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion mitx/lms/templates/static_templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h3 class="section-title">Frequently Asked Questions</h3>
<p>The MIT faculty member responsible for the course makes this decision on a case-by-case basis. This is why you may see different formats for each different course you access in the Open Learning Library. Most often, though, what you will see is the content and assessments that you need to work through in order to learn, while other assessments whose principal purpose is testing whether you have earned a certificate are only available on edX.org, where you can have the opportunity to earn a certificate.</p>
</div>
</div>
<div class="item">
<div class="item" id="why_support_mit_faq">
<div class="accordion-title">Why support Open Learning?</div>
<div class="accordion-content">
<p>
Expand Down

0 comments on commit 83f7dcc

Please sign in to comment.