• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Nested Elements created with JS are not getting their attributes  RSS feed

 
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am creating some div elements and the ones that are nested are showing up in the page without the attributes.  The parent element that I am creating is getting all the attributes without any problem.  Is there something wrong with how I am doing it?  I tried rephrasing it a few different ways but the attributes aren't showing up.


 
Al Hobbs
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you think it might be because I am adding an inner html to the nested ones? 
 
Al Hobbs
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I think it might actually be because the innerhtml.  Apparently, jquery will call innerhtml if there's something in there, so that might be why the attributes aren't put in there.  I'll have to check that out tomorrow.
http://api.jquery.com/jquery/#jQuery-html-ownerDocument
 
Al Hobbs
Ranch Hand
Posts: 207
2
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea, so I was right.  I changed it to this and it works perfectly now

       
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!