01/10/2018, 08:19
Không thêm được class vào thẻ li bằng jquery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tinh cmn teees</title>
<!-- Latest compiled and minified CSS & JS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/stylesheet.css">
<link href="https://fonts.googleapis.com/css?family=Sansita" rel="stylesheet">
<script src="js/js.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a href="" class="navbar-brand"><img class="reponsive-image" src="img/tinhte.png" alt=""></a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav nav-pills" role="menu">
<li class=""><a href=""> Diễn đàn</a></li>
<li class=""><a href="">Gallery</a></li>
<li class=""><a href="">Timeline</a></li>
<li class=""><a href="">Thư viện</a></li>
<li class=""><a href="">Rao vặt</a></li>
<form class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button class="btn btn-danger">login</button>
<button class="btn btn-danger">register</button>
</form>
</ul>
</div>
</div>
</nav>
Bài liên quan
Bạn vứt đại 1 đoạn code lênh, chả nói cái gì cã, rồi đoạn jquery củng không có? Thế này thì ai mà trả lời?
Thêm nội dung đầy đủ thì pm mình mở lại topic nhé.