check element has a class starting with string using jquery
<p>I am getting the last element from a form which has a value like this: </p>

<pre><code>var lastOne =$(':text[name^=distanceSlab][value!=""]').last();
</code></pre>

<p>now I want to find the element which has a class that begins with the string "limit".
I have tried something like:</p>

<pre><code>if(lastOne.is("class^='limit'")){
    console.log('BEGINNING WITH LIMIT')
}
</code></pre>

<p>but it didn't work. How do I do this?</p>
