I am learning web development and this is my first questions. Sorry if I ask in unstructured manner.
I am using flexslider in my project and I want to extract some values from slider.
<ul class="position-list slides background-white">
<li id="172" class="slide pointer season-selector active" data-short-year="17" data-short-desc="FW17"></li>
<li id="173" class="slide pointer season-selector active" data-short-year="18" data-short-desc="SS18"></li>
I want to get data-short-desc
values. I tried .find
to get values but it doesn't work.
$(".position-list").find('data-short-year').val();
Is there any way to get those values?
This is different to the title of your question. To achieve this you can use the
sort()
method: