<ul><li class="rjust">
<a href="#" class="edit-video-lightbox" id="4f80a4b5">Edit</a>
<input type="hidden" class="video_title" value="test123">
<input type="hidden" class="video_description" value="Sample Description">
<input type="hidden" class="video_tags" value="Adjust">
<input type="hidden" class="video_tags" value="TXV">
</li>
<li class="rjust">
<a href="#" class="edit-video-lightbox" id="235235">Edit</a>
<input type="hidden" class="video_title" value="another_test">
<input type="hidden" class="video_description" value="descriptme agian">
<input type="hidden" class="video_tags" value="tag1">
<input type="hidden" class="video_tags" value="tag2">
</li></ul>
When I click on the “Edit” a href, I want to get all the values of the class “video_tags” nearest to it.
Example when the 1st “Edit” is being click (id=”4f80a4b5″), I want to get all the value of the “video_tags” which is “Adjust”, “TXV”.
On the other hand, when I click on the other “Edit” (id=”235235″), all the value of “video_tags” that I should get is “tag1″,”tag2” since it obviously it is near to it.
Take note that the class “video_tags” is flexible, it could have many classes, my example has just only 2 video_tags per li.
Kindly please help me with this matter.
Any help would be greatly appreciated and rewarded! Thanks 🙂
You can try this