Tag Archives: Content Length

Count Number of Elements With Jquery

jquery1




There may be times when you need to work out how many times a particular element appears on a page or within a section with Javascript and this is easy to do with jQuery using the length property. Using the method in this post you can also work out if an element exists on the page with jQuery. What is correct way to count number of elements using jQuery? It can be done using .length and size() method but here […]

Compress JSON data

json1




JSON is good data format to grab some server side data through an AJAX call. For example by using jQuery.ajax method. In PHP, to provide data in JSON format in super simple. However, when the data is large, do you know any ways to compress the data to facilitate for fast transmission. JSON – JavaScript Object Notation Here is a simple tutorial to introduce how to use format data in JSON format in PHP. First, you need to set the […]