Con JQuery dovrebbe essere abbastanza facile.
Ad esempio:
codice:$("div.padre").on("click", "a", function (event) { event.preventDefault(); var self = $(this); var index = self.parent().children().index(self); alert(index); });
Con JQuery dovrebbe essere abbastanza facile.
Ad esempio:
codice:$("div.padre").on("click", "a", function (event) { event.preventDefault(); var self = $(this); var index = self.parent().children().index(self); alert(index); });
MARCO BREVEGLIERI
Software and Web Developer, Teacher and Consultant
Home | Blog | Delphi Podcast | Twitch | Altro...