I've dynamically created multiples divs and I randomly assigned an attribute id ,called mine-data with a value of 10, to some of them, now I'm creating a function that looks for divs with attribute 'mine-data' and returns true. but it doesn't work. I've looked at similar questions and none of the answers worked.
Any idea how to make it work?

```
function isattr() {
    var attrb=$('.grid').attr('mine-data');    
    if(attrb==10) { 
       return true;
    }
}

```