I have this small function:
$('#part[en]').keyup(function(){
//console.log($(this).val());
$slug = slugify($(this).val());
$('#part_slug').val($slug);
})
It doesn't work. After some try and error, I understood the problem is with the ID (part[en]). If I change it to "part" (and change it in HTML too) it works. My problem is that I need to use part[en] since I need to work them as an array with PHP.
How can I achieve this? Also, I need to do the exact same thing with 2 ID's (keyup or change). There's any way to make something link
part[en].keyup OR part2[en].keyup
Or I need to create two seperate functions? Thanks in advance.