I'm using a SELECT as a main menu. There are several options, fx. "My Profile". If I go to "My Profile" and continue further down the site tree, the menu is still present and shows "My Profile" eventhough the accual page is "My Profile > Edit Profile > E-mail settings".
If I开发者_JAVA技巧, on "E-mail settings" or other pages here under, want to go to "My Profile" I cant. Because the option has already been selected.
//DropdownMenu controller
$('select.dropdownMenu').change(function() {
//alert('url = ' + this.value );
window.location.href = this.value;
});
The above code, only works on change. So I can't select the selected option. I want to.
How can I fix this? jQuery? Do you know?
Thank you in advance.
I found out how.
//DropdownMenu controller
$('select.dropdownMenu option').click(function() {
window.location.href = this.value;
});
精彩评论