Below is the simple script to get country from IP: $.get("http://ipinfo.io/"+ip, function (response) { //response.country); //response.region); }, "jsonp"); Here is how you can use...
While working with ASP.NET multiline textbox I realized that MaxLength property was not working, it seems it was bypassed by ASP.NET engine. I decided to write a small JavaScript piece of code in orde...
While working with IE7 one of our pages was giving Operation Aborted error. I was getting the following screen: The reason for this error was that I was trying to add new elments to body tag via scrip...
If you want to load external JavaScript file dynamically i.e via JavaScript code you can take help from the following code: var loadJs= function (src, callback) { var s = document.createElement('s...
Below is the code to show how to pass params to jquery trigger function: $('#TestAnchor').on('foo', function(event, param1, param2) { alert(param1); alert(param2); }); $('#TestAnch...
Today I was trying to open multipl Twitter bootstrap modal one above the other i.e in stack. After the second modal initiate script ".modal('show')' the Chrome was getting crashed. Be...
After upgrading IE to IE10 on my machine (Windows 7 64 bit) I was facing weird issues with ajax "POST" calls. The data was not posted to server with IE10, I confirmed that with fiddler . The...
While working with "load" method of image I noticed it was not working successfully in IE. I was using the following code: $('<img/>').attr('src', '<...
In our application we made custom Image modal for image upload for TinyMCE. When user clicks any the images inside that modal we are inserting that image inside the tinyMCE editor. The code was like t...
If you want to replace smielys with custom images this blog will help you. Let's say ypu have the following string hello :) :( and you want that to be converted to "hello happy sad", bas...
Following is the snippet of JavaScript which will detect whether you are running IE8 version or not:
jQuery provides a nice method isArray to check whether a variable is array or not. Below is the samp
$("<img/>") .attr('src', photoResizerSelector.attr('src') + '?keeprefresh=' + (new Date().getT
In this blog I will show you how to change the text of "Play again" button flowerplayer video player
Today I was working with a calendar application where I needed to convert hours to AM/PM format. I w
http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area
http://stackoverflow.com/questions/1314383/how-to-check-if-a-querystring-value-is-present-via-javasc
Normal 0 false false false MicrosoftInternetExplorer4 In this blog, I will share few useful developer tools for client side scripting . I believe any
Caculate age from DOB using Javascript