It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes Trying to add a DOM object using jquery but its not displaying on the browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Trying to add a DOM object using jquery but its not displaying on the browser" Watch "Trying to add a DOM object using jquery but its not displaying on the browser" New topic
Author

Trying to add a DOM object using jquery but its not displaying on the browser

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055


Hi,

I am using the below code



http://www.lifesbizzare.blogspot.com || OCJP:81%
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4343
    
    8

So, you're creating a new paragraph and...then what? You don't do anything with it. It's just like creating any other object - it doesn't have any connections to anything else until you add them. I'd suggest looking in the jQuery docs for functions that add to the DOM.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Think about it for a minute. If it were to be automatically inserted into the DOM just by creating it, how would jQuery know where in the DOM to put it? You've got to tell it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

Thank you Bear And Mathew , I got what you meant to convey.
 
 
subject: Trying to add a DOM object using jquery but its not displaying on the browser
 
Similar Threads
Getting MethodMissingException on trying to run groovy class
Saving File from web upload
Pigs in pens
REgular Expression for string validation
Regex pattern - unprintable characters