Welcome Guest, Not a member yet? Register   Sign In
capture id on click
#4

If you use jQuery in your project, you can use the attr() function to get the value of an attribute:

Code:
$(".btn").click(function () {
 alert($(this).attr('id'));
});
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
capture id on click - by ryan - 12-31-2015, 09:34 AM
RE: capture id on click - by includebeer - 12-31-2015, 03:34 PM
RE: capture id on click - by ryan - 12-31-2015, 06:48 PM
RE: capture id on click - by includebeer - 01-01-2016, 08:58 AM
RE: capture id on click - by Wouter60 - 01-01-2016, 09:45 AM
RE: capture id on click - by ryan - 01-03-2016, 08:58 AM
RE: capture id on click - by includebeer - 01-03-2016, 10:34 AM
RE: capture id on click - by Wouter60 - 01-03-2016, 10:41 AM
RE: capture id on click - by ryan - 01-03-2016, 12:24 PM
RE: capture id on click - by PaulD - 01-03-2016, 12:53 PM
RE: capture id on click - by Wouter60 - 01-03-2016, 11:45 PM
RE: capture id on click - by ryan - 01-04-2016, 08:36 PM
RE: capture id on click - by ryan - 01-05-2016, 07:19 AM
RE: capture id on click - by mr_pablo - 01-05-2016, 08:46 AM
RE: capture id on click - by ryan - 01-05-2016, 08:53 AM
RE: capture id on click - by mr_pablo - 01-05-2016, 09:10 AM
RE: capture id on click - by ryan - 01-05-2016, 09:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB