jQuery button on a li does not triggers change event on input before click

vagcratttak

New Member
I have a input field. When the onchange event is triggered, I want to enable a jQuery button based on a LI element. I want to have the same behaviour as a normal button would do. The problem is, if I click on button when it's disabled, jQuery catches the event and prevents the default behaviour to occurs, which should release the focus on the input field and trigger the onchange event before the onclick is triggered on the button. I'm using jQuery 1.6.4 with jQuery UI 1.8.16 in Chrome.In this live demo : http://jsfiddle.net/francisfortier/QMDc2/5/, you have three fieldsets. The first one uses a standard button, the second one, a jQuery button based on a li and the third one, use again a jQuery button based on a li with a special hack to manually release the focus from the input field on the click capture. This third fieldset can solve my problem on modern browsers, but it will not in IE8 because it requires to use event capturing.Do you have a better cross browser solution to have the same behaviour with a jQuery button as a standard button?Thank you
 
Top