This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ccwang002
Recipients ccwang002, docs@python, eric.araujo, ezio.melotti, georg.brandl
Date 2016-01-31.10:05:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454234717.37.0.159058452495.issue26246@psf.upfronthosting.co.za>
In-reply-to
Content
The code output toggle button (the `>>>` button on the top right) has been disappeared and not functional on the current online documentation (both 3.4+ and 2.7). 


For example, see any doc page that has interpreter outputs:

    https://docs.python.org/3/tutorial/introduction.html#numbers
    https://docs.python.org/3.5/tutorial/introduction.html#numbers
    https://docs.python.org/3.4/tutorial/introduction.html#numbers
    https://docs.python.org/2/tutorial/introduction.html#numbers


These toggle buttons are created dynamically using jQuery by the script at Doc/tools/static/copybutton.js. However, the method .toggle() it used for click event handling has been deprecated since jQuery 1.8 and removed since jQuery 1.9.

    https://api.jquery.com/toggle-event/


Current Python documentation ships with jQuery v1.11.1 and it has a new .toggle() method with totally different behavior, which controls animation and hide the element. Therefore those buttons are invisible and has no effect.

    https://api.jquery.com/toggle/


To achieve the old behavior, one now needs to create this toggle event on one's own. The most popular way to store the toggle state is by jQuery's .data() data storage.

A patch is attached to make the button functional again.
History
Date User Action Args
2016-01-31 10:05:17ccwang002setrecipients: + ccwang002, georg.brandl, ezio.melotti, eric.araujo, docs@python
2016-01-31 10:05:17ccwang002setmessageid: <1454234717.37.0.159058452495.issue26246@psf.upfronthosting.co.za>
2016-01-31 10:05:17ccwang002linkissue26246 messages
2016-01-31 10:05:16ccwang002create