This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 213
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: 213
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: 213
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: 213
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!