How to get SITE URL in javascript

Below is the code that help to get the site url in javascript, the purpose of this code is Sometime we need the site url in using js, in mine case i need to call ajax and want to set site base url so I have used this code and passes this in ajax URL. […]

How to maintain the scroll of page we have visited previously using localStorage

Here’s the Code that I have used for maintaining the scroll of web page I have visited Previously using localStorage. $(function () {/scroll maintaining states/var storedResult = localStorage.getItem(“location”);var storedURL = localStorage.getItem(“url”);if (storedURL !== ‘undefined’ && storedResult !== null) {if (storedResult !== ‘undefined’ && storedResult !== null) { $(window).scrollTop(storedResult);}}$(window).scroll(function () {var scrolledDown = window.scrollY;var currentUrl = […]

How to check checkbox is checked or not using jquery

FacebookTwitterLinkedinPinterest