Access DOM Elements inside in returned render function

Access DOM Elements inside in returned render function

v0snv0sn Posts: 1Questions: 1Answers: 0
edited June 2019 in Free community support
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.

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    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

This discussion has been closed.