TypeError: f[0]在Bootstrap.min中未定义。当这个错误发生时,如何修复它?

时间:2022-11-03 20:16:36

I am making slider using bootstrap.

我正在用bootstrap做滑动条。

<section class="customers">
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <h2> <?php echo  $FC_options['FC_customer_line'];?></h2>
            <div id="ReviewCarousel" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
                <ol class="carousel-indicators">
                    <?php $loop = get_posts( array( 'post_type' => 'Testimonials', 'posts_per_page' => -1 ) ); ?>
                            <?php foreach ( $loop as $post ) : setup_postdata( $post ); ?>
                        <li data-target="#ReviewCarousel" data-slide-to="<?php echo $cur++; ?>" class="active"></li>
                        <?php  endforeach;
                               wp_reset_postdata();
                        ?>
                </ol>

                <!-- Wrapper for slides -->
                <div class="carousel-inner" role="listbox">
                  <?php $loop = get_posts( array( 'post_type' => 'Testimonials', 'posts_per_page' => -1 ) );  ?>
                  <?php  foreach ( $loop as $post ) : setup_postdata( $post ); ?>
                    <div class="item customer_review">
                        <p><?php echo $post->post_content;?></p>            
                        <label><?php echo $post->post_title;?></label>
                    </div>
                <?php endforeach;  wp_reset_postdata(); ?>

                </div>
    </div><!-- row -->
</div><!-- Container -->
</section>

I am getting error TypeError: f[0] is undefined.Why this error occured and how to solve it Becase my slider is not working.I have includend bootstrap.min.js. But here,main code for the slider and it's not working.

我得到错误类型错误:f[0]未定义。为什么会出现这个错误,以及如何解决它,因为我的滑块没有工作。我有includend bootstrap.min.js。但是这里,滑动条的主代码不工作。

1 个解决方案

#1


2  

Remove the data-ride="carousel" from the div with ReviewCarousel, this sometimes cause the problem and give the TypeError: f[0].

从带有ReviewCarousel的div中删除data-ride="carousel",这有时会导致问题并给出TypeError: f[0]。

Try and check...

试着检查……

#1


2  

Remove the data-ride="carousel" from the div with ReviewCarousel, this sometimes cause the problem and give the TypeError: f[0].

从带有ReviewCarousel的div中删除data-ride="carousel",这有时会导致问题并给出TypeError: f[0]。

Try and check...

试着检查……