Skip to content

Commit

Permalink
= 4.2.6.5 =
Browse files Browse the repository at this point in the history
~ Fixed: scroll to el archive courses.
  • Loading branch information
tungnxt89 committed Apr 6, 2024
1 parent d0082c9 commit 3183133
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions assets/src/js/frontend/courses-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ document.addEventListener( 'submit', function( e ) {
//window.lpCourseList.searchCourse( e, target );
} );

const elListenScroll = [];
let timeOutSearch;
window.lpCoursesList = ( () => {
const classListCourse = '.lp-list-courses-no-css';
Expand Down Expand Up @@ -94,10 +93,9 @@ window.lpCoursesList = ( () => {
}
// End

// Scroll to archive element{
const optionScroll = { behavior: 'smooth' };
elLPTarget.scrollIntoView( optionScroll );
window.scrollBy( 0, -40 );
// Scroll to archive element
const elLPTargetY = elLPTarget.getBoundingClientRect().top + window.scrollY;
window.scrollTo( { top: elLPTargetY } );

const callBack = {
success: ( response ) => {
Expand Down

0 comments on commit 3183133

Please sign in to comment.