Passing Result from jQuery Embedded function to Parent JavaScript Function For Return?
I don't know why the embedded jQuery function below is not returning the value to my JS var? I do get the expected value in console.log(" >>>> FINAL RESULTS RETURNED : " + results);
function _dtmGetCurrResults(){ var results = []; $(function() { $('[class*="solid-shape-large-rating-"]').each(function(i, e) { var result = this.className.match(/solid-shape-large-rating-(.*?)\s+/); results.push(result[1]); }); results = results.join("|"); console.log(" >>>> FINAL RESULTS RETURNED : " + results); }); return results; };var myResults = _dtmGetCurrResults();