List View Click Event Example Windows 8 JavaScript (WinJS)

Here is a simple example of selecting an item from a List View with Windows 8 JavaScript (WinJS).


Windows 8 Link List Click Event


 HTML ( nothing special here):

        <div id="basicListView"

JavaScript (this is inside my ‘ready’):

            /** Grabbing the List View by id **/
            var pictureListDOM = document.getElementById('basicListView').winControl;
            /** Add event listener **/
            pictureListDOM.addEventListener('iteminvoked', SelectItem);

            /** The Event **/
            function SelectItem(event) {
                var selectedItem = event.detail.itemIndex; // The index
                // Do what you need to do here

Graveyard Database Logo

Has everything you want to know about grave yards. Plus has many celebrites and world leaders graves. Pssst it is my other site

Google + Profile
Check out Android Photo Mapping, its a app/site I been working on

  • wholesale nfl jerseys
  • wholesale sports jerseys