I am having Jquery function with an div id, I have to attached a dynamic value with that div id. The div id name is foodtypes
$(function() {
var i = 0;
$('body').on('click','#foodtypes+i+ input',function() {
console.log('foodtype function called')
});
But this method is never called.SO, i hardcoded the value of i as below then its working fine.
$(function() {
var i = 0;
$('body').on('click','#foodtypes0 input',function() {
console.log('foodtype function called')
});
Someone help me how to pass that or concatenate the variable dynamically.