942,785 Members | Top Members by Rank

Ad:
Oct 30th, 2009
0

Adding elements dynamically in javascript using jquery

Expand Post »
hi,
in my case i want to add a new menu item(actually a div tag) to my existing menu when an event or method calling occurs. i want to append a div tag dynamically to my existing menu with all css and effects. so if you guys have a better idea for this matter plz let me know. that will be a great pleasure .


thanks. regards.

udayanga...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
udayangaS is offline Offline
6 posts
since Oct 2009
Oct 30th, 2009
0
Re: Adding elements dynamically in javascript using jquery
Something like this will insert a div with class new_item before the element with class class_next
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. $('<div class="new_item"><\/div>').insertBefore('.class_next');
Sponsor
Featured Poster
Reputation Points: 546
Solved Threads: 715
Bite my shiny metal ass!
pritaeas is offline Offline
4,137 posts
since Jul 2006
Nov 2nd, 2009
0
Re: Adding elements dynamically in javascript using jquery
hey thanks , pritaeas for ur quick reply. i think this will help wit my matter. hope ur help again.
regards.
udayanga.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
udayangaS is offline Offline
6 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Need Help
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Google Maps Directions in infowindows





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC