Pull text from span class & enter in input

Pull text from span class & enter in input

Trying to look at classes starting w/ "searcher_stack-its_img".  When clicked, I want to pull the text from the span's class.  Right now, not seeing the console log output.  After, like to enter the span class text into input#select_searcher

Typ. div w/ an image:

  1. <div class="searcher_stack-its_img...">
  2.   <a href="javascript:void(0)">
  3.     <img src="resources/testimg.png">
  4.   </a>
  5.   <span class="b2"></span>
  6. </div>

  1. $('div[class^="searcher_stack-its_img"]').click (function() {
  2.   var sterms = $(this).children("span").attr("class");
  3.   console.log('Clicked Search Img Terms: ' + sterms);
  4.   .. enter class value into input#select_searcher
  5. });
Thanks,
Bill