Removal of inline events via unbind() could be added to the core, it's
very useful. I guess a check for .attr('on'+event) wouldn't be much
overhead. Where do we file enhancement proposals?On Jan 15, 5:46 pm, John Resig <[email protected]> wrote: > > If an event is defined in a tag, say <img onclick="alert('Sneh');" />, > > then $(img).unbind() has no effect on the onclick attribute. I have > > to go in an set the onclick="". > > > Is this expected behavior? > > I'm not sure. Since it wasn't an event that we bound I'm not sure what > the protocol would be for removing it (we'd have to iterate through > every possible bound event and figure out if the on* version of it > exists - and if so, remove it. So yeah, I probably recommend just > setting the value into onclick yourself. > > --John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
