Buy Questpond's video subscriptions on
huge discount
.
Online: 4025
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
jQuery
>
Loading ...
jQuery - prepend and after method [Resolved]
Posted by
Akiii
under
jQuery
on 5/30/2011 |
Points: 10
| Views : 5269 | Status :
[Member]
| Replies : 4
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
Hi,
Can anyone tell me what is the difference between jQuery prepend() and after() method...
$("p").append(" Akiii");
and
$("p").after(" Akiii123");
Thanks and Regards
Akiii
[Resolved]
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Nithadeepak
on: 5/31/2011
[Member]
Bronze
|
Points: 50
0
Hi akiii,
In after method another element is inserted after a specified element (not only a line break).
That means we can insert a button after a paragraph etc. (here 2 different elements ).
But in append(), a specified content is appended at the end of the element (inside the element). That is the same element is appended.
In the examples given in w3schools...
when we use after() One <p> element is inserted after a specified <p> element. That means there are two <p> elements in th page.
But when we use append() some contents are appended to the same <p> elements. So there is only one <p> element in the page.
If you got the point,mark it as resolved...
Thanks,
Nitha Deepak
Akiii
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Nithadeepak
on: 5/30/2011
[Member]
Bronze
|
Points: 25
0
Hi,
The append() method inserts specified content at the end of
(but still inside)
the selected elements.
The after() method inserts specified content after the selected elements. Ie, inserts another element after a specified element.
Refer these.....
http://www.w3schools.com/jquery/html_after.asp
http://www.w3schools.com/jquery/html_append.asp
Thanks,
Nitha Deepak
Akiii
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Akiii
on: 5/31/2011
[Member]
Bronze
|
Points: 25
0
hi..nitha..
thanks for your reply....
the
after()
is giving a line break and then writing the text while
append()
is writing the text next to it.....!
Regards
Akiii
Akiii
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Akiii
on: 5/31/2011
[Member]
Bronze
|
Points: 25
0
hi nitha....
Thank you very much for the explanation.....
much appreciated....
Thanks and Regards
Akiii
Akiii
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...