Suppose we have the following function in javascript:
var modal=$("div[class*=div_modal]");
//Accedo al primer elemento del array
var modal2 = modal[0];
//quiero obtener el primer div
modal2.children('div').eq(0);
console.log(modal2);
But I get the following error:
modal2.children is not a function
Why does this happen? How do I apply the children?