i\'m using setInterval to check if a p(html paragraph) has a certain text value. if it has it i want to clear interval an continue code flow. i\'m using this in a jQuery plu
Use setTimeout instead of setInterval.
Something like:
var checkTextValue = setTimeout(function() { var textVal = $('p').text(); if (textVal == 'expectedValue'){ callback(); } else { setTimeout(arguments.callee, 10); } },10);