Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
tegatti
Add a <li> in <ul>
in
Using jQuery
•
5 years ago
Hi,
I need you help to add, at the end of my list, a new <li>
I've tryed n this way but not working:
$("#barraCoordinatore ul li").last().html('<li><h6> Menu 5 </h6></li>');
Any idea?
Thanks in advance
Tegatti
1
Reply
Replies(12)
jakecigar
Re: Add a <li> in <ul>
5 years ago
$("#barraCoordinatore ul").
append
('
<li><h6> Menu 5 </h6></li>');
JΛ̊KE
Leave a comment on jakecigar's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Hi Jake,
how are are you?
I've tryed your solution but not working
Tegatti
Leave a comment on tegatti's reply
jakecigar
Re: Add a <li> in <ul>
5 years ago
https://jsfiddle.net/jakecigar/pc1460r4/
works.
JΛ̊KE
Leave a comment on jakecigar's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Jake,
I've moved id="
barraCoordinatore"
from <ul> to <div>
and now it works.
Thanks a lot jake
Have a good night
Tegatti
jakecigar
Re: Re: Add a <li> in <ul>
5 years ago
ciao ciao!
JΛ̊KE
Leave a comment on tegatti's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Jake
I would like to insert instead <li>Menu 5 </li> a js variable.
I've tryed in this way:
var coordinatore = $("#coordinatoreClasse").val()
$("#barraCoordinatore ul").append('<li><h6> coordinatore </h6></li>');
but I have the string "coordinatore" and not his value
Can you help me, please?
Thanks
Tegatti
Leave a comment on tegatti's reply
jakecigar
Re: Add a <li> in <ul>
5 years ago
$("#barraCoordinatore ul").append('<li><h6>'+ coordinatore +'</h6></li>');
JΛ̊KE
Leave a comment on jakecigar's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Thanks Jake,
more one question:
if I would like to add a text to the 3rd element of the list?
Tegatti
Leave a comment on tegatti's reply
jakecigar
Re: Add a <li> in <ul>
5 years ago
https://jsfiddle.net/jakecigar/pc1460r4/6/
JΛ̊KE
Leave a comment on jakecigar's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Jake,
the 3rd element already contains a text. I would like to add more text
Tegatti
Leave a comment on tegatti's reply
jakecigar
Re: Add a <li> in <ul>
5 years ago
https://jsfiddle.net/jakecigar/pc1460r4/7/
You should know these simple jquery methods. Spend some time at the
jQuery Learning Center
!
JΛ̊KE
Leave a comment on jakecigar's reply
tegatti
Re: Add a <li> in <ul>
5 years ago
Grazie Jake,
I have to spend time to learn jquery!!
Ciao
Leave a comment on tegatti's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to tegatti's question
Top
Reply
{"z20661349":[14737000006850042,14737000006850047,14737000006850049,14737000006847125,14737000006847129,14737000006847133,14737000006847137],"z2950240":[14737000006847101,14737000006847107,14737000006847109,14737000006847127,14737000006847131,14737000006847135]}
Statistics
12
Replies
1787
Views
1
Followers
Tags
No tags available for this topic.
Cancel
Actions
Permalink
Related Posts
How to sort <li>s by id and b...
I need to add a class in one li of ...