Using jquery, how can I select all the DIVs in my document with ID names containing specific text?
<p>Using jquery, how can I select all the DIVs in my document with ID names containing specific text?</p>

<p>I want to select all the elements that contain 'parent', the problem is the string parent might be in the middle of the string.</p>

<p>I've been trying to use:</p>

<pre><code>var allcontent_collection = $('div[id^=.*parent.*]')
</code></pre>

<p>It is not working. Should it or am I completely wrong in my approach?</p>
