刷新/重新加载两个div时有一个延迟

时间:2017-12-20 04:32:03

标签: javascript jquery codeigniter

我使用codeigniter php框架工作我的项目我能够重新/重新加载我选择的div

<div class="content-wrapper">
    <div class="container-fluid">
        <ol class="breadcrumb">
            <li class="breadcrumb-item">
            <a href="#">Dashboard</a>
            </li>
            <li class="breadcrumb-item active">My Dashboard</li>
        </ol>
        <div class="row">
            <div class="col-sm-12 mb-3">
                <button class="btn btn-dark btn-lg" id="button-refresh"><i class="fa fa-refresh" aria-hidden="true"></i></button>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4">
                <div class="card text-white bg-primary o-hidden h-100" id="inbox-dashbord">
                    <div class="card-body" id="total_inbox">
                        <div class="card-body-icon">
                            <i class="fa fa-fw fa-comments"></i>
                        </div>
                        <div class="mr-5" id="newtotalinbox"><?php echo $total_inbox;?> New Messages</div>
                    </div>
                    <a class="card-footer text-white clearfix small z-1" href="<?php echo base_url('mail/inbox');?>">
                    <span class="float-left">View Inbox</span>
                    <span class="float-right">
                    <i class="fa fa-angle-right"></i>
                    </span>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

两者之间似乎有几秒钟的延迟。 它不会同时改变。

  

询问如何确保同时完成两个div的刷新/重新加载?

这是我的信息中心视图

<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
    <a class="navbar-brand" href="index.html"></a>
    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarResponsive">
        <ul class="navbar-nav navbar-sidenav" id="exampleAccordion">

            <li class="nav-item">
                <a class="nav-link" href="<?php echo base_url('dashboard');?>">
                <i class="fa fa-fw fa-dashboard"></i>
                <span class="nav-link-text">Dashboard</span>
            </a>
            </li>

            <li class="nav-item">
                <a class="nav-link btn btn-danger text-white" id="compose-button">
                <span class="nav-link-text">Compose</span>
            </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="<?php echo base_url('mail/inbox');?>">Inbox <span id="menu_unread" class="text-white"><?php echo $menu_unread;?></span></a>
            </li>

            <li class="nav-item">
            <a class="nav-link" href="<?php echo base_url('mail/sent');?>">
            <span class="nav-link-text">Sent</span>
            </a>
            </li>

            <li class="nav-item">
            <a class="nav-link" href="<?php echo base_url('mail/drafts');?>">Drafts</a>
            </li>

            <li class="nav-item">
            <a class="nav-link" href="<?php echo base_url('mail/spam');?>">Spam
            </a>
            </li>

            <li class="nav-item">
            <a class="nav-link" href="<?php echo base_url('mail/trash');?>">Trash
            </a>
            </li>

            <li class="nav-item">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseExamplePages" data-parent="#exampleAccordion">Events
                </a>
                <ul class="sidenav-second-level collapse" id="collapseExamplePages">
                    <li>
                        <a href="<?php echo base_url('event/create');?>">Create Event</a>
                    </li>
                    <li>
                        <a href="<?php echo base_url('event/all');?>">View All Events</a>
                    </li>
                </ul>
            </li>
        </ul>

        <ul class="navbar-nav ml-auto">
            <li class="nav-item">
                <a class="nav-link" href="<?php echo base_url('logout');?>">
                <i class="fa fa-fw fa-sign-out"></i>Logout</a>
            </li>
        </ul>
    </div>
</nav>

这是我的菜单视图

<fragment 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:layout="@layout/fragment_home" />

enter image description here

0 个答案:

没有答案