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:
- <div class="searcher_stack-its_img...">
- <a href="javascript:void(0)">
- <img src="resources/testimg.png">
- </a>
- <span class="b2"></span>
- </div>
- $('div[class^="searcher_stack-its_img"]').click (function() {
- var sterms = $(this).children("span").attr("class");
- console.log('Clicked Search Img Terms: ' + sterms);
- .. enter class value into input#select_searcher
- });
Thanks,
Bill