In my document, I have a nav bar:
<div data-role="navbar">
<ul>
<li><a href="#allfreebies" data-ajax="false" class="right-link-icon" id="first-link-to-select">All freebies</a></li>
<li><a href="#favorite" data-ajax="false" class="left-link-icon">Favorite Freebies</a></li>
</ul>
</div><!--navbar-->
Each link, when clicked on, has a nice css which get applied (blue border and white background color).
Now I am trying to fire the click event programmatically on the window load :
window.onload = function(){
$("#first-link-to-select").click();
}
Once my document finished loading, I notice the blue border is getting applied on the link, but not the white background color. Is this the wrong event to call ? Am I missing anything ?