Can't get bootstrap 4 tabs to work with blade










1















I have a little problem here, trying to design a profile but can't get bootstrap 4 tabs to work. Here's the profile page code.



@extends('layouts.core')
@section('content')
<div class="content">


<div class="row profile-content">
<div class="col-sm-3">
<h2>Profile Information</h2>
<ul class="list-group">
<li class="list-group-item">
Name : $post->name
</li>
<li class="list-group-item">
Email : $post->email
</li>
<li class="list-group-item">
Verified :
@if($post->email_verified_at)
Yes
@else
No
@endif
</li>
</ul>
</div>

<div class="col-md">
<h2>Posted Products</h2>
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab"
data-toggle="pill" href="#pills-home" role="tab"
aria-controls="pills-home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-profile-tab"
data-toggle="pill" href="#pills-profile" role="tab"
aria-controls="pills-profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-contact-tab"
data-toggle="pill" href="#pills-contact" role="tab"
aria-controls="pills-contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home"
role="tabpanel" aria-labelledby="pills-home-tab">
@foreach($query as $row)
<div class="product-card" role="tab">
<div class="card">
<div class="card-head">
<img class="card-img-top"
src="/storage/products/$row->image"
alt="Card image cap">
</div>
<div class="card-body">
<h5 class="card-title">
<a href="/product/$row->unique_id">
$row->name
</a>
</h5>
<p class="card-text">$row->price$</p>
<p class="card-text">
@if($row->stock==0)
<span style="color:red;">
Not Available
</span>
@else
Stock : $row->stock
@endif
</p>
</div>
<div class="card-body text-center">
<a href="/product/$row->unique_id"
class="btn btn-primary">
<i class="fas fa-info-circle mr-2"></i>
Details
</a>
@if(Auth::user())
@if(!$row->stock==0)
<a href="/add/$row->unique_id/1"
class="btn btn-success mr-2">
<i class="fas fa-cart-plus mr-2"></i>
Add To Cart
</a>
@endif
@endif
</div>
@if(Auth::user()->is_admin || $row->by == Auth::user()->email)
<form class='col text-center p-0'
action=" action('PostsController@destroy' , $row->id)"
onsubmit="return confirm('Are you sure you want to delete ?');" class="text-right" method="POST">
<a class="btn btn-danger w-100">
<i class="fas fa-trash-alt" style="color:white;"></i>
<input type='submit' class='none' name="_method" value="Delete">
</a>
csrf_field()
</form>
@endif
</div>
</div>
@endforeach
</div>
</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel"
aria-labelledby="pills-profile-tab">
AAAAAAAAAAAAAAAAAA
</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel"
aria-labelledby="pills-contact-tab">
...
</div>
</div>

<div class="links">
$query->links()
</div>
</div>
</div>
@endsection


The javascript just appends the content from the other tabs to this current page. I dont know what's the deal. I want the first tab to display the user posts and when i will click on the second tab i want it to replace everything that's showing currently.










share|improve this question



















  • 2





    please attach header and footer section, so that others can understand is there any js or css issues

    – Emtiaz Zahid
    Nov 14 '18 at 2:48















1















I have a little problem here, trying to design a profile but can't get bootstrap 4 tabs to work. Here's the profile page code.



@extends('layouts.core')
@section('content')
<div class="content">


<div class="row profile-content">
<div class="col-sm-3">
<h2>Profile Information</h2>
<ul class="list-group">
<li class="list-group-item">
Name : $post->name
</li>
<li class="list-group-item">
Email : $post->email
</li>
<li class="list-group-item">
Verified :
@if($post->email_verified_at)
Yes
@else
No
@endif
</li>
</ul>
</div>

<div class="col-md">
<h2>Posted Products</h2>
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab"
data-toggle="pill" href="#pills-home" role="tab"
aria-controls="pills-home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-profile-tab"
data-toggle="pill" href="#pills-profile" role="tab"
aria-controls="pills-profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-contact-tab"
data-toggle="pill" href="#pills-contact" role="tab"
aria-controls="pills-contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home"
role="tabpanel" aria-labelledby="pills-home-tab">
@foreach($query as $row)
<div class="product-card" role="tab">
<div class="card">
<div class="card-head">
<img class="card-img-top"
src="/storage/products/$row->image"
alt="Card image cap">
</div>
<div class="card-body">
<h5 class="card-title">
<a href="/product/$row->unique_id">
$row->name
</a>
</h5>
<p class="card-text">$row->price$</p>
<p class="card-text">
@if($row->stock==0)
<span style="color:red;">
Not Available
</span>
@else
Stock : $row->stock
@endif
</p>
</div>
<div class="card-body text-center">
<a href="/product/$row->unique_id"
class="btn btn-primary">
<i class="fas fa-info-circle mr-2"></i>
Details
</a>
@if(Auth::user())
@if(!$row->stock==0)
<a href="/add/$row->unique_id/1"
class="btn btn-success mr-2">
<i class="fas fa-cart-plus mr-2"></i>
Add To Cart
</a>
@endif
@endif
</div>
@if(Auth::user()->is_admin || $row->by == Auth::user()->email)
<form class='col text-center p-0'
action=" action('PostsController@destroy' , $row->id)"
onsubmit="return confirm('Are you sure you want to delete ?');" class="text-right" method="POST">
<a class="btn btn-danger w-100">
<i class="fas fa-trash-alt" style="color:white;"></i>
<input type='submit' class='none' name="_method" value="Delete">
</a>
csrf_field()
</form>
@endif
</div>
</div>
@endforeach
</div>
</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel"
aria-labelledby="pills-profile-tab">
AAAAAAAAAAAAAAAAAA
</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel"
aria-labelledby="pills-contact-tab">
...
</div>
</div>

<div class="links">
$query->links()
</div>
</div>
</div>
@endsection


The javascript just appends the content from the other tabs to this current page. I dont know what's the deal. I want the first tab to display the user posts and when i will click on the second tab i want it to replace everything that's showing currently.










share|improve this question



















  • 2





    please attach header and footer section, so that others can understand is there any js or css issues

    – Emtiaz Zahid
    Nov 14 '18 at 2:48













1












1








1








I have a little problem here, trying to design a profile but can't get bootstrap 4 tabs to work. Here's the profile page code.



@extends('layouts.core')
@section('content')
<div class="content">


<div class="row profile-content">
<div class="col-sm-3">
<h2>Profile Information</h2>
<ul class="list-group">
<li class="list-group-item">
Name : $post->name
</li>
<li class="list-group-item">
Email : $post->email
</li>
<li class="list-group-item">
Verified :
@if($post->email_verified_at)
Yes
@else
No
@endif
</li>
</ul>
</div>

<div class="col-md">
<h2>Posted Products</h2>
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab"
data-toggle="pill" href="#pills-home" role="tab"
aria-controls="pills-home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-profile-tab"
data-toggle="pill" href="#pills-profile" role="tab"
aria-controls="pills-profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-contact-tab"
data-toggle="pill" href="#pills-contact" role="tab"
aria-controls="pills-contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home"
role="tabpanel" aria-labelledby="pills-home-tab">
@foreach($query as $row)
<div class="product-card" role="tab">
<div class="card">
<div class="card-head">
<img class="card-img-top"
src="/storage/products/$row->image"
alt="Card image cap">
</div>
<div class="card-body">
<h5 class="card-title">
<a href="/product/$row->unique_id">
$row->name
</a>
</h5>
<p class="card-text">$row->price$</p>
<p class="card-text">
@if($row->stock==0)
<span style="color:red;">
Not Available
</span>
@else
Stock : $row->stock
@endif
</p>
</div>
<div class="card-body text-center">
<a href="/product/$row->unique_id"
class="btn btn-primary">
<i class="fas fa-info-circle mr-2"></i>
Details
</a>
@if(Auth::user())
@if(!$row->stock==0)
<a href="/add/$row->unique_id/1"
class="btn btn-success mr-2">
<i class="fas fa-cart-plus mr-2"></i>
Add To Cart
</a>
@endif
@endif
</div>
@if(Auth::user()->is_admin || $row->by == Auth::user()->email)
<form class='col text-center p-0'
action=" action('PostsController@destroy' , $row->id)"
onsubmit="return confirm('Are you sure you want to delete ?');" class="text-right" method="POST">
<a class="btn btn-danger w-100">
<i class="fas fa-trash-alt" style="color:white;"></i>
<input type='submit' class='none' name="_method" value="Delete">
</a>
csrf_field()
</form>
@endif
</div>
</div>
@endforeach
</div>
</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel"
aria-labelledby="pills-profile-tab">
AAAAAAAAAAAAAAAAAA
</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel"
aria-labelledby="pills-contact-tab">
...
</div>
</div>

<div class="links">
$query->links()
</div>
</div>
</div>
@endsection


The javascript just appends the content from the other tabs to this current page. I dont know what's the deal. I want the first tab to display the user posts and when i will click on the second tab i want it to replace everything that's showing currently.










share|improve this question
















I have a little problem here, trying to design a profile but can't get bootstrap 4 tabs to work. Here's the profile page code.



@extends('layouts.core')
@section('content')
<div class="content">


<div class="row profile-content">
<div class="col-sm-3">
<h2>Profile Information</h2>
<ul class="list-group">
<li class="list-group-item">
Name : $post->name
</li>
<li class="list-group-item">
Email : $post->email
</li>
<li class="list-group-item">
Verified :
@if($post->email_verified_at)
Yes
@else
No
@endif
</li>
</ul>
</div>

<div class="col-md">
<h2>Posted Products</h2>
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab"
data-toggle="pill" href="#pills-home" role="tab"
aria-controls="pills-home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-profile-tab"
data-toggle="pill" href="#pills-profile" role="tab"
aria-controls="pills-profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-contact-tab"
data-toggle="pill" href="#pills-contact" role="tab"
aria-controls="pills-contact" aria-selected="false">Contact</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home"
role="tabpanel" aria-labelledby="pills-home-tab">
@foreach($query as $row)
<div class="product-card" role="tab">
<div class="card">
<div class="card-head">
<img class="card-img-top"
src="/storage/products/$row->image"
alt="Card image cap">
</div>
<div class="card-body">
<h5 class="card-title">
<a href="/product/$row->unique_id">
$row->name
</a>
</h5>
<p class="card-text">$row->price$</p>
<p class="card-text">
@if($row->stock==0)
<span style="color:red;">
Not Available
</span>
@else
Stock : $row->stock
@endif
</p>
</div>
<div class="card-body text-center">
<a href="/product/$row->unique_id"
class="btn btn-primary">
<i class="fas fa-info-circle mr-2"></i>
Details
</a>
@if(Auth::user())
@if(!$row->stock==0)
<a href="/add/$row->unique_id/1"
class="btn btn-success mr-2">
<i class="fas fa-cart-plus mr-2"></i>
Add To Cart
</a>
@endif
@endif
</div>
@if(Auth::user()->is_admin || $row->by == Auth::user()->email)
<form class='col text-center p-0'
action=" action('PostsController@destroy' , $row->id)"
onsubmit="return confirm('Are you sure you want to delete ?');" class="text-right" method="POST">
<a class="btn btn-danger w-100">
<i class="fas fa-trash-alt" style="color:white;"></i>
<input type='submit' class='none' name="_method" value="Delete">
</a>
csrf_field()
</form>
@endif
</div>
</div>
@endforeach
</div>
</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel"
aria-labelledby="pills-profile-tab">
AAAAAAAAAAAAAAAAAA
</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel"
aria-labelledby="pills-contact-tab">
...
</div>
</div>

<div class="links">
$query->links()
</div>
</div>
</div>
@endsection


The javascript just appends the content from the other tabs to this current page. I dont know what's the deal. I want the first tab to display the user posts and when i will click on the second tab i want it to replace everything that's showing currently.







html laravel bootstrap-4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 6:33









Priyanka khullar

543212




543212










asked Nov 14 '18 at 2:17









Areg GhazaryanAreg Ghazaryan

62




62







  • 2





    please attach header and footer section, so that others can understand is there any js or css issues

    – Emtiaz Zahid
    Nov 14 '18 at 2:48












  • 2





    please attach header and footer section, so that others can understand is there any js or css issues

    – Emtiaz Zahid
    Nov 14 '18 at 2:48







2




2





please attach header and footer section, so that others can understand is there any js or css issues

– Emtiaz Zahid
Nov 14 '18 at 2:48





please attach header and footer section, so that others can understand is there any js or css issues

– Emtiaz Zahid
Nov 14 '18 at 2:48












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292254%2fcant-get-bootstrap-4-tabs-to-work-with-blade%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292254%2fcant-get-bootstrap-4-tabs-to-work-with-blade%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

Museum of Modern and Contemporary Art of Trento and Rovereto