Get the ID of an element where the class contains a given string
<p>I am currently trying to figure out a way to get the ID of an element, depending on whether its class contains something.  I'm not sure if there's a better way to do it than I currently am, but having looked around nothing fits exactly the need I have.  The code I currently have is, where I am looking for a div element whose class contains the string "one" but is not limited to that.  Currently there is only one element containing this string but the alert provides me with [Object NodeList] (I may well be overcomplicating this):</p>

<pre><code>$idToMove = document.querySelectorAll('div[class^="one"]');
        alert($idToMove);
</code></pre>