I do not know if it's the split you use, in jquery, but I'm not having success. In my code I get the ID value that comes dynamically, I want to split the ID in two. One part up to character 16 and then the rest .. how can I do this?
I do not know if it's the split you use, in jquery, but I'm not having success. In my code I get the ID value that comes dynamically, I want to split the ID in two. One part up to character 16 and then the rest .. how can I do this?
The following code speaks for itself.
It takes a string value, its dynamic id, and divides it between 2 variables (String):
var id = "suaIDgeradaDinamicamente";
var primeiraParteID = id.substring(0,16);
var segundaParteID = id.substring(16);
console.log("ID :"+id+" - "+id.length);
console.log("Primeira parte da id 0 até 16 caracteres :"+primeiraParteID);
console.log("Segunda parte da id :"+segundaParteID);