Select Page

Tag: jQuery

Scroll to top – jQuery

Scroll to top – jQuery

I think this function is very important and included by almost all websites nowadays with medium to long page lengths. As a user, it feels very tedious to scroll up to the top of websites once we have scrolled down to the bottom of a long page. The function is written...

Get the data related to your IP address with this free service

http://ip-api.com/json $(document).ready(function(){ $.getJSON(“http://ip-api.com/json”, function (data) { var country = data.country; alert(country); }); }); Get the location, city, country and other information related to your IP address with this free...
Smooth scroll for anchors – jQuery

Smooth scroll for anchors – jQuery

Just place this code anywhere after including jQuery library. This helps the user scroll to the ‘element’ id in href=”#element”. $(function () { /* Slide to # location with animation */ $(document).on(‘click’,...