Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: carousel-fade not working

Guy Mizrahi free asked 6 years ago


hello,i follow the tutorials and tring to set a basic slider.

www.onepage.leadbook.co.il/

the problem is:

when the slider move (or when i click on arrows) there is a bug and all the screen moving with the picture instead of animate fade.

i checked and i see carousel-fade in my carousel but its still not working.

this is the code:

<!--Carousel Wrapper-->
<div id="carousel-example-1" class="carousel slide carousel-fade" data-ride="carousel" data-interval="false">
<!--Indicators-->
<ol class="carousel-indicators">
<li data-target="#carousel-example-1" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-1" data-slide-to="1"></li>
</ol>
<!--/.Indicators-->

<!--Slides-->
<div class="carousel-inner" role="listbox">

<!--Dynamic query listing posts from "carousel" category-->
<?php
$counter = 1;
$args = array(
'orderby' => 'date',
'order' => 'ASC',
'posts_per_page' => 2,
'category_name' => 'carousel'
);

// The Query
$query1 = new WP_Query( $args );

if ( $query1->have_posts() ) {
// The Loop
while ( $query1->have_posts() ) {
$query1->the_post();
?>
<!-- Looping slide -->
<div class="carousel-item view hm-black-light <?php echo $counter==1 ? "active": ""; ?>" style="background-image: url('<?php echo the_post_thumbnail_url();?>'); background-repeat: no-repeat; background-size: cover;">
<!-- Caption -->
<div class="full-bg-img flex-center white-text">
<ul class="animated fadeIn col-md-12">
<li>
<h1 class="h1-responsive"><?php echo get_the_title(); ?></h1>
</li>
<li>
<p><?php echo get_the_excerpt();?></p>
</li>
<li>
<a href="<?php echo get_permalink() ?>" class="btn btn-lg btn-elegant " rel="nofollow">Read more!</a>
</li>
</ul>
</div>
<!-- /.Caption -->
</div>
<!--/.Looping slide-->
<?php
$counter++;
}
wp_reset_postdata();
} ?>
<!--/.Dynamic query listing posts from "carousel" category-->

</div>
<!--/.Slides-->

<!--Controls-->
<a class="carousel-control-prev" href="#carousel-example-1" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel-example-1" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
<!--/.Controls-->
</div>
<!--/.Carousel Wrapper-->

 


Marta Wierzbicka staff answered 6 years ago


Hi, you can check properties of .view in the console. Best, Marta

Marta Wierzbicka staff answered 6 years ago


Hi, this bug was fixed in MDB version 4.4.5, so please update your MDB package. Best, Marta

Guy Mizrahi free commented 6 years ago

hi Marta, thank you for the quick answer. i been downloaded the lastest version. ( 4.4.5 ) i played a little bit with the code and now the slider works good. there is one problem left. when i click the arrows left / right there is white flash between the fadeIn effect. thats like the time take between fadein go 0 and the other slider get display:block there is any sulotion for this bug? thanks in advance

Guy Mizrahi free commented 6 years ago

edit: fixed... just removed 'view' in: carousel-item hm-black-light what view does? thanks


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: Yes
Tags