This is probably the jquery basics, but I can not find a solution after much googling.
How do you attach "non-events" to the elements inserted in the DOM? For the event, like click , we can use Specifically, I'm trying to get the tab () to work in the content of an AJAX-loaded dialogue, but I think the correct solution should be applied in any case . I saw a trick that was included in For example, how can you add fire to a newly inserted table row? I mean it is inherent, which means that I do not want to write specific instructions for every event that adds a node to the dom, I want to "run it in the background". Tell me if this explanation is required, I get many such questions, but have not given any answers. Edit: Simple example: One page call Edit: I have tried all kinds of force (), trigger () and change () methods I am afraid that I am barking the wrong tree. You will need to see if you need to apply things for new added elements ). Tab (); or something like that live () or
bind () . For example, how do you start
tab () or
addClass () in a new element?
$ ('body').
$ ('A'). AddClass ('Highlight') which works on all anchors in the page Then a new anchor is dynamically added to the page in jQuery, but the class is not added.
Comments
Post a Comment