I have an `<ul>` with unknown numbers of `<li>` elements inside.
Every `<li>` elements could have or not `$('p.have')` element with some text.
I want to receive a text from every `$('p.have')` elements and if there is no `$('p.have')` we have receive an empty string.
Possible example of `<ul>`:

```
<ul>
        <li>
            <p class="have">Text from first</p>
        </li>
        <li>
            <p class="have">Text from second</p>
        </li>
        <li>
            <p class="notHave">Not our text</p>
        </li>
        <li>
            <p class="have">Text from fourth</p>
        </li>
        <li>
            <p class="have">Text from five</p>
        </li>
    </ul>

```

Resul:
 'Text from first', 
 'Text from second', 
 ' ', 
 'Text from fourth'

I'm using following script:

```
var textLocation = $('ul li');
var  mytext = [];
function findText (){
    for (var p = 0 ; p < textLocation.length; p++) {
        if(textLocation[p].find('p.have')) {
            mytext.push($(this).text());
        } else { mytext.push(' ');}
    }

}

findText();
console.log(mytext);

```

but I am receiving following error

> 
> Uncaught TypeError: textLocation[p].find is not a function
> 
> 
> 

Can anybody help me to solve the problem