changed jQuery method from text to val for azure compatibility