Slide toggle from right to left and left to right using jQuery UI

In this post I am going to explain, how we can slide a div element from right to left and left to right using jQuery UI toggle() method. Firstly, I will explain how we can do it using a simple example and finally, in the last demo section I will post two additional fiddle demos on the slide effect.┬á­čÖé
Continue reading

Styling alternate rows in HTML table using jQuery

In this post I am going to explain, how we can style the alternate rows of an HTML table using the power of jQuery. We can also do the same using the CSS fully but in case you prefer or are more interested to know, how to do it with jQuery and some CSS, here’s the demo. Let’s say we have a┬áHTML┬ámarkup like this:
Continue reading

Parse JSON data using jQuery.getJSON()

In this post I am going to explain, how we can parse a JSON data which we will get here using one of the jQuery Ajax shorthand method$.getJSON(). Basically, the $.getJSON() method loads the┬áJSON-encoded data from the server using a GET HTTP request based on a┬áURL to which the request is sent. It also has a┬ácallback function which is executed if the request succeeds.┬áThe returned data passed to the┬ácallback function┬áis typically a JavaScript object or array as defined by the JSON structure and parsed using the┬á$.parseJSON()┬ámethod. So, we don’t need to worry about if the data returned from the server is an integer, string or else, since it’s always a┬áJSON-encoded data.

Continue reading