added jquery snippet functionality