Opened 10 years ago
Closed 10 years ago
#14140 closed bug (notabug)
trigger error: TypeError: parentPage[0] is undefined on jQuery collection with more than 1 root element
Reported by: | 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)
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.