Adding elements dynamically in javascript using jquery

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Oct 2009
Posts: 5
Reputation: udayangaS is an unknown quantity at this point 
Solved Threads: 0
udayangaS udayangaS is offline Offline
Newbie Poster

Adding elements dynamically in javascript using jquery

 
0
  #1
Oct 30th, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 883
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 144
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark
 
0
  #2
Oct 30th, 2009
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');
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: udayangaS is an unknown quantity at this point 
Solved Threads: 0
udayangaS udayangaS is offline Offline
Newbie Poster
 
0
  #3
Nov 2nd, 2009
hey thanks , pritaeas for ur quick reply. i think this will help wit my matter. hope ur help again.
regards.
udayanga.
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 396 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC