Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Question .html() function
Naveen puttu
Ranch Hand
Posts: 88
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
I have done something like this
jQuery("<a/>") .attr( "id", "t3rms") .html("someBlah") .appendTo(jQuery('#TandC'));
How would i get the html value (someBlah here in this case) has been set to the anchor tag .
Eric Pascarello
author
Posts: 15385
6
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have no clue what you are asking.
Eric
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
$('#t3rms').html();
t3rms? Really?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Naveen puttu
Ranch Hand
Posts: 88
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The above code would generate
<a di="t3rms">someBlah</a>
I want to get that
string
"someBlah" and do fiddle with that value
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Already answered.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Eric Pascarello
author
Posts: 15385
6
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are you fiddling with it when you are adding it to the page? Shouldn't you already have the value at that point since you are adding it in?
Eric
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
True, but in most functionally-oriented jQuery-using code, it's unlikely that a reference to the content would be maintained anywhere.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Naveen puttu
Ranch Hand
Posts: 88
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks bear and eric
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to check canvas is empty or not in javascript
Not able to add submit button in HTML using jquery
jQuery advantages over javascript
jQuery- Verify I selected right element and i am unable to remove it?
focusing on an input element with jquery
More...