Skip to content

Demo page is broken #11

@RichardD2

Description

@RichardD2

Your demo page is pulling in jQuery 1.9 from the Google CDN. As a result, once you've clicked on an element, you can no longer change its state. Elements which start closed can be opened once and never closed again; elements which start open can be closed once and never opened again.

This seems to be related to the changes around attr/prop handling:
http://jquery.com/upgrade-guide/1.9/#attr-versus-prop-

The following two changes seem to fix the problem:

Line 35: (toggleOpen)
Replace: var isOpen = typeof $details.attr('open') == 'string',
With: var isOpen = $details.prop('open'),

Line 125:
Add: $details.prop('open', typeof $details.attr('open') == 'string');
Before: toggleOpen($details, $detailsSummary, $detailsNotSummary);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions