Skip to content

Commit

Permalink
Fix interactive circle text jumbled issue
Browse files Browse the repository at this point in the history
  • Loading branch information
himadree committed Jul 28, 2024
1 parent de3fab8 commit a1f1c43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/front-end/js/view/interactive-circle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions src/js/view/interactive-circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ ea.hooks.addAction( "init", "ea", () => {
}

if ( $animation !== 'eael-interactive-circle-animation-0' ) {
let $circleContent = $scope.find(".eael-circle-content.active"),
let $circleContent = $scope.find(".eael-circle-content"),
$activeItem = $scope.find('.eael-circle-btn.active');
$activeItem.siblings('.eael-circle-btn-content').removeClass('active');
// $activeItem.siblings('.eael-circle-btn-content').removeClass('active');

$('body').scroll(function () {
if($circleWrap.isInViewport()){
Expand All @@ -28,9 +28,12 @@ ea.hooks.addAction( "init", "ea", () => {
$($circleContent).waypoint(
function() {
$circleWrap.addClass($animation);
setTimeout(function (){
$activeItem.siblings('.eael-circle-btn-content').addClass('active');
},1700);
if ( $activeItem === true ) {
setTimeout( function (){
$activeItem.siblings('.eael-circle-btn-content').addClass('active');
}, 1700 );
}

},
{
offset: "80%",
Expand Down

0 comments on commit a1f1c43

Please sign in to comment.