Skip to main content

Bug Tracker

Side navigation

#14140 closed bug (notabug)

Opened July 16, 2013 06:06PM UTC

Closed July 16, 2013 06:11PM UTC

trigger error: TypeError: parentPage[0] is undefined on jQuery collection with more than 1 root element

Reported by: tiago.freire@gmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

Context: jQuery Mobile App.

Objective: Creating app-wide navigation contents in a panel to the left.

JQM 1.3.x does not have an app-wide panel, each page must have its own panel.

Actual panel contents are created on a single, separate page, and copied to every page using jQuery clone() and append() at runtime.

Problem raises when trigger() is called to the 'create' event on a collection with all pages.

If the call $(someselector).trigger('create') is called and $(someselector) has a single root element, it works. otherwise it gives the error:

TypeError: parentPage[0] is undefined

(as reported by Firefox 22 for Windows - using FireBug 1.11.4)

Attachments (0)
Change History (1)

Changed July 16, 2013 06:11PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

The text parentPage doesn't appear in jQuery core. Please reduce the problem to a simple test case and file it with the appropriate bug tracker, as listed at http://bugs.jquery.com.