views:

23

answers:

0

Ok so I have created a plugin which has an unordered list of list items, each list item has a class to identify it.

The plugin so far is able to get the unordered list in its entirety, but suppose i wanted to select 2 of the list items only which have classes associated to them. How would I accomplish this.

Here is my plugin, I tried using a selector to point to the classes I want to return from the list items but no luck.

The plugin name is barOne

Its called here where prefix0 is the id of the UL and alerts a list of each li

    var a = $('#prefix0').barOne();
    alert(a);

here is a section of the plugin code

    this.each(function () {

        var UnorderedList = $(this).text();


    });

cheers.