Jquery not seeing classes set by its self
Hi, I'm new to jQuery/JavaScript and I wondering if this is because it can only see classes/id that are set on page load.
I'm using the code below to give elements on my page individual id's.
- $(".text").each(function(count){
var new_id = "txt_" + count;
$(this).attr("id", new_id);
});
but when I try and call this id later in the code, it doesn't work.