TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Bootstrap Li Disable/Enable Under UL Using Jquery
Soumalya Das
Aug 10
2016
Code
12.9
k
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Html code
<
ul
class
=
"nav tabs"
>
<
li
class
=
"active"
id
=
"li1"
>
Item1
</
li
>
<
li
class
=
""
id
=
"li2"
>
Item2
</
li
>
<
li
class
=
"disabled"
id
=
"li3"
>
Item3
</
li
>
<
%--already disable--%
>
<
li
class
=
""
id
=
"li4"
>
Item4
</
li
>
<
li
class
=
""
id
=
"li5"
>
Item5
</
li
>
</
ul
>
jquery code
$(
"#li2"
).addClass(
"disabled"
);
// for 2nd li disable
$(
"#li3"
).removeClass(
"disabled"
);
// for 3rd li enable
Bootstrap Li
Disable/Enable Under UL
Jquery