I have checked this question
But it didnt work if i want to look if that class start by special string.
im trying to achieve something like this
<div class = "message_holder user12121 chatid47">
and when clicking
$(document).on ("mouseenter", ".message_holder", function () {
this_id = $(this).find("div[class*='user']");
alert(this_id.replace('user', '')); // i want to alert 12121
alert(this_id); // tried this also
})
but didnt work . im getting [object OBJECT] error.
if it was a fixed class this could work
$(this).find(".subclass");