How to get Index of <li> form append using in jquery?
<p>I am trying to get list item position but I can't. I would try to use append for make list. I have also this thing use on phonegap. I need to on list click to get item index what ever click me.</p>

<pre><code>&lt;!DOCTYPE html&gt;
    &lt;html&gt;

        &lt;head&gt;
            &lt;title&gt;&lt;/title&gt;
            &lt;meta name="viewport" content="width=device-width, initial-scale=1.0,   maximum-scale=1.0, user-scalable=0" /&gt;
            &lt;meta charset="utf-8"&gt;
            &lt;link rel="stylesheet" type="text/css" href="css/jsonteststyle.css" /&gt;
            &lt;!-- If your application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js into your www directory and include it here --&gt;
            &lt;script type="text/javascript" charset="utf-8" src="cordova-2.4.0.js"&gt;&lt;/script&gt;
            &lt;script type="text/javascript" charset="utf-8" src="jquery-1.9.1.min.js"&gt;

            &lt;/script&gt;
            &lt;script type="text/javascript" charset="utf-8"&gt;
                document.addEventListener("deviceready", onDeviceReady, false);
                console.log("body was loaded");


                function onDeviceReady() {

                    //  navigator.notification.alert("Cordova is working")
                    console.log("device work loaded");
                }


                $(document).ready(function () {


                    $.getJSON('http://critiques-demo.she.com/beauty/makeuptool/?file=get_models&amp;randVar=0.6320226406678557', function (data) {
                        $.each(data, function (k, v) {
                            //   document.write(v['id'] + ' ' + v['name']+'&lt;br /&gt;');
                            //    console.log(v['id'] + ' ' + v['name']);
                            addItem(v['name'],v['thumb_name']);

                        //  addItem(v['thumb_name']);

                        });
                    });


                    var addItem = function (item,items) {

              console.log("asdsdsd:::"+items);

         $("#nav").append('&lt;li&gt;&lt;img src="'+items+'"/&gt; &lt;h3&gt; '+item+'&lt;/h3&gt;&lt;/li&gt;');

                    }



                });



            &lt;/script&gt;
        &lt;/head&gt;

        &lt;body&gt;
            &lt;div class="container"&gt;
                &lt;section class="main"&gt;
                    &lt;form class="form-3"&gt;
                        &lt;div class="container2"&gt;
                            &lt;header class="topheader"&gt;
                                 &lt;h1&gt; &lt;strong&gt;  IndiaNIC  &lt;/strong&gt; &lt;/h1&gt;
                            &lt;/header&gt;
                           &lt;!--  &lt;ul id="nav"&gt;&lt;/ul&gt; --&gt;

                             &lt;div&gt;
      &lt;ul style="width: 300px; height: 300px; overflow: auto" id="nav"&gt;

      &lt;/ul&gt;
    &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/form&gt;​&lt;/section&gt;
            &lt;/div&gt;
        &lt;/body&gt;

    &lt;/html&gt;
</code></pre>
