0

I am using the jquery plugin ListNav to display a list of my "Authors" alphabetically.

This works great for sorting the first names alphabetically, but I need it to sort by last name.

Is there a way to accomplish this using the ListNav plugin? perhaps one way is to store the last name in a data attribute (data-last-name="Smith") and then have the plugin use that data attribute to sort the lists?

(Plugin) http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx

4

1 に答える 1

1

私のバージョンの ListNav https://github.com/esteinborn/jquery-listnavを見てください。

filterSelectorセレクターでフィルタリングするオプションを割り当てることができます。

姓を で囲みます<span class="lastname"></span>

次にオプションfilterSelector: '.lastname'を設定すると、すべて設定されます。

于 2013-06-11T15:35:53.757 に答える