Access DOM Elements inside in returned render function
Access DOM Elements inside in returned render function

targets: -1,
render: function(data, type, row) {
return `
<div class="btn-group">
<button type="button" class="btn btn-sm btn-light js-tooltip-enabled" data-toggle="tooltip"
data-original-title="Edit Client">
<i class="fa fa-bookmark"></i>
</button>
<form id="ja">
<button type="submit" class="btn btn-sm btn-light js-tooltip-enabled" data-toggle="tooltip"
data-original-title="Edit Client">
<i class="fa fa-shopping-basket"></i>
</button>
</form>
</div>`;
}
},
how can i access this form in another part of my script, for example
$('#ja')
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
Hi @v0sn ,
I'm not clear what you're trying to do. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin