dimanche 7 août 2016

Finding index of table rows with checked checkbox

I have a html table where the first cell of each row contains a checkbox. I would like to get the index of each row with a checked checkbox. I have access to JQuery as js/$

This is what I have so far, but it only returns Javascript object from which I cannot extract the index(es).

(-> (js/$ "#table tr")
    (.has ":checkbox:checked")
    (.find "td:eq(1)")
    (.each (fn [e] (.text (js/$ e)))))




Aucun commentaire:

Enregistrer un commentaire