23

First some HTML:

<div id="tmcl-request" class="tmcl-request" style="display: none">
Request:
<b> Node: </b><span id="node">33947</span>
</div>

Than some JavaScript:

$request = $('#tmcl-request');
$newrequest = $request.clone();

And now the question: I want to change the inner HTML of the <span id="node"> from the $newrequest object.

How to do this?

Thanks, Bigbohne

1 Answer 1

48
$('#tmcl-request').find('#node').html('whatever you want your html to be');

Thought, if you will have multiple nodes it's better to use a class instead of an id, so

$newrequest.find('#node').html('your html');
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.