Franck Marcia wrote:
>
> Hi, Brice
> I ran into the same problem.
> The workaround I found was something like this:
>
> <script>
> $(function() {
> $("#link").click(function() {
> if ($(this).html() == 'aaaa') {
> alert('aaaa');
> $(this).html('bbbb');
> } else {
> alert('bbbb');
> $(this).html('aaaa');
> }
> return false;
> });
> });
>
> </script>
>
Frank,
Thank you for helping me think CLEARLY! I have removed the rebind event &
actually simplified things via the following;
var action = (jQuery(link).is('.tsToggleEdit')) ? 'save' : 'edit';
(action == 'save') ?
jQuery(link).removeClass('tsToggleEdit').html(defaults.EDIT_HTML) :
jQuery(link).addClass('tsToggleEdit').html(defaults.SAVE_HTML);
Note the use of jQuery() vs $() as this takes place within a plugin.
While my code moves on... I'm wondering if the rebind issue should be
considered a bug in IE or jQuery? And if we should work to resolve it?
Thanks,
~ Brice
--
View this message in context:
http://www.nabble.com/BUG%3A-Rebinding-an-event-in-IE-tf2510315.html#a7003233
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/