JavaScript is the programming language of HTML and the Web. Programming makes computers do what you want them to do. JavaScript is easy to learn. This tutorial will teach you JavaScript from basic to advanced.

Bidirectional Relationship Support in JSON

Ever tried to create a JSON data structure that includes entities that have a bidirectional relationship (i.e., circular reference)? If you have, you’ve likely seen a JavaScript error along the lines of “Uncaught TypeError: Converting circular structure to JSON”. Or if you’re a Java developer who uses Jackson library, you may have encountered “Could not write JSON: Infinite recursion (StackOverflowError) with root cause java.lang.StackOverflowError”. This article provides a robust working approach to creating JSON structures that include a bidirectional relationship without resulting in these errors.

Document and window click event not works in iPhone and iPad as expected

$(document).click(function (e) {}); or $(window).click(function (e) {}); will work perfectly on IE, Firefox and Chrome. But it won't work in iPhone and iPad Safari except some elements. Since by default "DIVs" are not "clickable" elements we have to makes iOS treat it as clickable. The problem is iPhones dont raise click events. They raise "touch" events. A small work around is to make the element clickable using CSS. So you need to add

Javascript / jQuery : Handling dynamic text change inside HTML elements with Example

To detect the event when text change inside the any HTML element like div, span, table or etc., using DOMNodeInserted, DOMContentLoaded, DOMSubtreeModified and DOMNodeRemoved events. These events are known as Mutation events. Below is the sample code of handling Mutation events on different browsers.