view raw
IamNOOB IamNOOB - 6 months ago 77
HTML Question

Materialize css tabs are not working

I am making profile ui for mobile. I am using materialize css for that.. But in my case it's not working. I mean the tabs are not working.

So here is the code.


<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!DOCTYPE html>

<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="">

<!-- Compiled and minified JavaScript -->
<script src=""></script>

<link rel="stylesheet" href="profile.css">
<div class="nav">

<div class="profile">

<div class="cover-img">
<img id="cover-img" src="" width="100%" height="150px" >
<div class="profile-meta z-depth-3">
<div class="profile-img">
<img id="profile-img" src="" height="100px" width="100px">

<div class="profile-name">
<p class="profile-name">Profile Name</p>
<div class="profile-id">
<p class="profile-id">Profile ID</p>
<div class="profile-desc">
<p class="profile-desc">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec in sollicitudin lectus, et gravida mauris. </p>
<ul class="profile-stats">

<div class="profile-btn"><a class="waves-effect waves-light btn center-btn purple">Follow</a></div>

<div class="row">
<div class="col s12">
<ul class="tabs">
<li class="tab col s3"><a href="#test1">Test 1</a></li>
<li class="tab col s3"><a class="active" href="#test2">Test 2</a></li>

<li class="tab col s3"><a href="#test4">Test 4</a></li>
<div id="test1" class="col s12">Test 1</div>
<div id="test2" class="col s12">Test 2</div>

<div id="test4" class="col s12">Test 4</div>

$('ul.tabs').tabs('select_tab', 'tab_id');


Thanx for the help........


Don't forget to add jQuery <script src=""></script>"></script>