Skip to main content

Jquery Mobile - Filtering the Listview

    So you have a very long list of items and you want to provide the users with a searching facility. There is nothing to worry here. Jquery Mobile provides a very simple solution to a very difficult and time-comsuming looking problem. jQuery Mobile provides a very easy way to filter a list with a simple client-side search feature. To make a list filterable, simply add the data-filter="true" attribute to the list. The framework will then append a search box above the list and add the behavior to filter out list items that don't contain the current search string as the user types. The input's placeholder text defaults to "Filter items...".

    Now again, this is not going to satisfy the client. The client will not like the default search and will ask for customization. No problem again. We can do it very easily again by virtue of the Jquery Mobile framework. To configure the placeholder text in the search input, use the data attribute "data-filter-placeholder" on your listview. By default the search box inherits its theme from its parent. The search box theme too can be configured using the data attribute "data-filter-theme" on your listview. So now you have a customized filterable listview.

    Following is a simple example of how the search works with the listview. Hope you have follow the example here. Do drop a comment in case you have any doubt or want to see something more in this post or on the blog in general.



Comments

Recommended for You

Where does Google get it's live traffic data from?

Referring to a post that I wrote earlier, Google’s - Live traffic Layer , ever wondered how Google collected this data? I was wondering the other day, how Google received live data to display it on their maps as a layer! I looked up the web and found something very interesting and am sharing the same with you all. As we all know, the traffic layer is available most accurately in several states in USA. Most major metro areas in the US have sensors embedded in their highways. These sensors track real time traffic data. Easy to miss at high speeds (hopefully anyway, traffic permitting), more commonly noticed may be the similar sensors that often exist at many busy intersections that help the traffic lights most efficiently let the most amount of people through. The information from these tracking sensors is reported back to the Department of Transportation (DOT). The DOT uses this data to update some of the digital signs that report traffic conditions in many metro areas. They als

Playing with the markers and info window bubbles...

    In the last few posts, we have seen some marker examples and some information window examples. Now, lets do something interesting combining these two things. Just writing that "This is an info window" in the information bubble is not very interesting! And I know this...Have gone through the same phase!     So, today we will do something interesting! We will display the latitude- longitude co-ordinates of the point that the user clicks on the map! Doing this is not at all complex! Copy paste the following code and you will see for yourself a map coming to life!     The output of the above code looks as seen in the result section above! If you have any queries regarding the above code please comment on the blog post or feel free to contact me at my mail ID .

Integrated GPS cameras...

          GeoSpatial Experts has introduced three new GPS Camera bundles designed specifically for geotagging and mapping digital photographs. The firm now offers its popular GPS-Photo Link 5.0 photo-mapping software with the new Ricoh G700SE, Sony A55, and Casio EX-H20G GPS cameras.           All of the GPS cameras below will provide you with geotagged photos, additionally, some can also offer the ability to capture the direction the photo was taken with a built-in compass, or the ability to collect attribute data in the field. WiFi and Bluetooth will allow you to communicate with laser range finder equipment to measure exact distance from the photographer to the item being photographed. Some GPS cameras provide a ruggedized camera to withstand harsh conditions.            In 2007, Ricoh introduced its 500SE model as the first GPS-equipped SLR designed for GIS data collection, and the new G700SE is more compact and offers many upgrades. Fully ruggedized and waterproo

Google Street View Image API

    Street View is one of most used feature of the Google Maps and why not? You can actually see any part of the world as if you are visiting the place at that very moment. And now with the Google Street View Image API, you don't even need to carry a camera with you to the places you visit. You can take-in all the scenic beauty without even bothering about clicking a single picture. You can come back from your vacation and get a few images using the Google Street View Image API and show those images to your friends and relatives. Create an album of high definition images and go ahead and share it on Facebook for your friends to have a look.     Using the Google Street View Image API is very simple and anybody can make use of it without any programming knowledge required. I will walk you through the entire process of effectively using the Google Street View Image API. So if you are set, let's go on an amazing ride across the globe with the Google Street Views.     The Go

GIS Technology to identify all properties in BBMP Limits

          The Bruhat Bangalore Mahanagara Palike (BBMP) has for the last two years, been in the process of conducting a massive exercise to map the 13.87 lakh properties in the 198 wards in the city. Geographical Information System (GIS) has proven to be an effective tool for analysing and displaying thematic maps of all the roads for proper evaluation and correction of zones.            As of now, 11 lakh properties have come under the tax net. The aim of this programme, which is perhaps the first such exercise being conducted in the country on such a large scale, covering 800 square km, is to bring all properties under the tax net and ensure that the BBMP has accurate information pertaining to the properties’ dimension, built-up area, land use and classification. The process of validation of GIS maps will be completed in January 2011.           The process uses satellite digital maps of the BBMP area to generate a vector map from the information obtained. These high r