php – Why does my navigation not transition when I click on it?-ThrowExceptions

Exception or error:

I have a navigation that works when I’m on my profile but when I’m on someone’s else profile the navigation doesn’t work. This happens when viewing the site on my mobile device. I been searching all over the internet but can’t figure out how it works on one page and not the next. It doesn’t do anything when I click on it. Any ideas?

Working navigation page

<div class="dashLogoMain">
    <div class="dashLogo">
        <a href="{{ route('view.my.profile') }}"><img src="{{ URL::asset('images/logo.png') }}" alt=""></a>
    </div>
    @if(Request::path() == 'view-my-profile')
        <div class="upld-cover-photo"><a href="#" id="coverPhotolink"><img src="{{ URL::asset('images/camra-icon.png') }}"></a></div>
    @endif

    @if(Auth::check())
        <div class="notification-photo">
            <a href="{{ route('view.notification') }}" id=""><img src="{{ URL::asset('images/notification-icon.png') }}"></a>
            <span id="notification-count"></span>
        </div>
    @endif

    <div class="dashTopright"><a href="javascript:void(0)"><img src="{{ URL::asset('images/user-icon.png') }}" alt=""> My Profile <img src="{{ URL::asset('images/profdown-arrow.png') }}" alt=""></a>
        <div class="profList">
            <ul>
                <li><a href="{{ route('view.my.profile') }}">My Profile</a></li>
                <li><a href="{{ route('settings') }}">Settings</a></li>
                <li>
                    <a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Logout</a>
                    <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
                        {{ csrf_field() }}
                    </form>
                </li>
            </ul>
        </div>
    </div>
    <div class="mobmenuIcon"><a href="javascript:void(0)" class="transition"><i class="transition"></i><i class="transition"></i><i></i></a></div>
</div>

Non-Working navigation

    <div class="dashLogoMain">
    <div class="dashLogo">
        <a href="{{ route('view.my.profile') }}"><img src="{{ URL::asset('images/logo.png') }}" alt=""></a>
    </div>
    <div class="dashTopright"><a href="javascript:void(0)"><img src="{{ URL::asset('images/user-icon.png') }}" alt=""> My Profile <img src="{{ URL::asset('images/profdown-arrow.png') }}" alt=""></a>
        <div class="profList">
            <ul>
                <li><a href="{{ route('view.my.profile') }}">My Profile</a></li>
                <li><a href="{{ route('settings') }}">Settings</a></li>
                <li>
                    <a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Logout</a>
                    <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
                        {{ csrf_field() }}
                    </form>
                </li>
            </ul>
        </div>
    </div>
    <div class="mobmenuIcon"><a href="javascript:void(0)" class="transition"><i class="transition"></i><i class="transition"></i><i></i></a></div>
</div>

Stylesheet

.mobmenuIcon {display:none; float: right; margin-left: 10px; position: absolute; right: 10px; top: 25px; vertical-align: top; width: 35px;}
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *