Nittro clickable table row

3 months ago

izytech_thomas
Member | 11
+
0
-

Hi,

Im searching for a method to make a table row clickable and execute a signal action with nittro. jQuery with clickable row fires an request but it does not fit in the nittro package. Is there an function to call in nittor or an tag that can be added in the TR element to fire an ajax request to Nette?

jQuery(document).ready(function($) {

    $(".clickable-row").click(function() {
        var hrefVar = $(this).data("href");
        $.get(hrefVar);
    });


});
<tbody n:snippet="entries">
    {foreach $items as $entry}
        <tr class="clickable-row" data-href="search?do=hello">
            <td>{$entry->getId()}</td>
            <td class="name"><a n:href="hello!">{$entry->getName()}</a></td>
            <td>{$entry->getScb()}</td>
            <td></td>
            <td></td>
        </tr>
    {/foreach}
</tbody>

Best regards
Thomas

3 months ago

izytech_thomas
Member | 11
+
0
-

Could anyone give me an hint?