$('#inputbox').focus(function() {$(this).val('somevalue')})
The way around this is to use event bubbling. You can use this script to allow jQuery live function to work with focus event: http://stackoverflow.com/questions/1199293/simulating-focus-and-blur-in-jquery-live-method (jQuery 1.4 and above should have this built in). So the correct code will look like:
$('#inputbox').live('focus', function() {$(this).val('somevalue')})
IE will not put the cursor in the exact position where user would expect it to be.
0 comments:
Post a Comment