jQuery load/parse JSON response Takes a well-formed JSON string and returns the resulting JavaScript value, probably object or array of objects. Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all invalid JSON strings: “{test: 1}” (test does not have double quotes around it). “{‘test’: 1}” (‘test’ is using single quotes ... Read More »
Tag Archives: jQuery
Javascript for loop vs jQuery for each
Javascript for loop vs jQuery for each Web developers often come across looping through data at client side. People generally use native Javascript coding for loop, or jQuery for each. Javascript For Loop. Example var names= ["jkoder", "kumar", "temp"]; var i; var text=""; for (i = 0; i < cars.length; i++) { text += names[i] + ","; } document.write(text); Result-> ... Read More »
jQuery detecting scroll- scroll reaching to the bottom of page
jQuery detecting scroll- scroll reaching to the bottom of page Detecting scroll and executing login based on scrolling has important significance in web development like implementing pagination, where more data gets loaded when user scrolls near the bottom of page. So, first basic question arises as to how to detect scroll. OR, if you are a jQuery freak, you can ... Read More »
How to detect selected checkbox/radio elements in jQuery Mobile framework
How to detect selected checkbox/radio elements in jQuery Mobile Framework Well! detecting checked OR radio elements seems no difficult task as far as JQuery is concerned. But here I will discuss some small points (which may fill your knowledge gaps) and finally will provide a fully tested jQuery code that detects checked OR radio elements for jQuery mobile framework. First ... Read More »
How to handle jQuery cross domain AJAX request
Cross Domain jQuery AJAX request AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal, means that the following below listed requests won’t work- Requesting https://serverA.com/a.php from http://serverA.com/b.php Requesting http://subdomain.serverA.com from http://serverA.com Requesting http://serverA.com:5000 from http://serverA.com Here in this tutorial we will cover the ways to handle this restriction. First lets look at the ... Read More »