Edit this page

up.fragment up:fragment:inserted
DOM event

When any page fragment has been inserted or updated, this event is emitted on the fragment.

If you're looking to run code when a new fragment matches a selector, use up.compiler() instead.

Example

up.on('up:fragment:inserted', function(event, fragment) {
  console.log("Looks like we have a new %o!", fragment)
})

Event properties

event.target Element

The fragment that has been inserted or updated.