Give this way:
$(function () {
// Give the below one, or use the perfect selector for your first <li>
$("li").first().trigger("click");
});
Or if you are making it using <select>
tag, you need to handle it in a different way:
$(function () {
// Give the below one, or use the perfect selector for your first <select>
$("select option").first().prop("selected", true);
});
1
solved How to set list item clicked by default when page loads