How to write a JQuery code with example