I have the following HTML:
<ol id="selectable">
<li class="ui-state-default">Option 1</li>
<li class="ui-state-default">Option 1</li>
<li class="ui-state-default">Option 3</li>
</ol>
I need, for example the first option, to be selected by default on page load. I use the following code without any luck:
$(document).ready(function () {
$('#selctable li:first').addClass('ui-selected');
});
Any ideas on what I'm doing wrong?