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
Screen name:
nouman
nouman's Profile
2
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Adding a new list item to the TOP of a UL, and before the last LI
[3Replies]
09-Jun-2010 10:43 PM
Forum:
Using jQuery
Hey guys,
so to get the point, I want to add a list item to the top of a ul, and in another case above the last li.
The first one really doesn't have a visual aspect to go with it, just adding a new item, the second can be illustrated as:
<ul>
<li>a</li>
--------------------------> On clicking submit, each new LI will go above the subit list item
<li><submit></li>
</ul>
One of the problems Im running into doing it as below is that if there is no list item in the UL above the submit button, it can't do -2 length.
Any and all help would be great, you guys rock!
var whichLi = $(thisPost).parent().find("ul.replies > li");
var thisLi = whichLi.eq(whichLi.length-2);
.children.children.children.children, is there an easier way?
[2Replies]
19-Apr-2010 09:19 AM
Forum:
Using jQuery
Hey Guys, firstly thanks for taking the time to read this!
So I'm just starting out, and having a little difficulty understanding how to target other html markup around a certain 'on click' item.
here's the setup:
<ul>
<li>
<a> - Click Function
<ul class="replies">
<li><form><p><TEXTAREA /></p></form></li>
</ul>
</li>
</ul>
So when the user clicks the anchor the text is inserted into the following textarea. I achieved this by:
$(this).nextAll('ul.replies').children('li').children('form').children('p').children('textarea').val($areaValue + $username);
Is there an easier way?
thanks!
«Prev
Next »
Moderate user : nouman
Forum