Modified using $(document).ready(function().