[pydotorg-www] You can now use jQuery UI logic on python.org CMS pages

Marc-Andre Lemburg mal at egenix.com
Wed Nov 2 18:41:24 EDT 2022


We've added a new CMS page type "Markdown (unsafe)" to the website
today. This allows using jQuery UI elements on select pages:

https://jqueryui.com/

Here's an example using an accordion:

https://www.python.org/psf/trademarks-faq/

Here's an example of the code to add to the page (at the bottom),
after enabling the new page type:

"""
<!-- Accordion Logic -->

<script 
src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script 
src="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script>
$( function() {
   $("#questions").accordion({
       header: "h3",
       collapsible: true,
       heightStyle: "content"
     }); }
);
</script>
"""

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Nov 02 2022)
 >>> Python Projects, Coaching and Support ...    https://www.egenix.com/
 >>> Python Product Development ...        https://consulting.egenix.com/
________________________________________________________________________

::: We implement business ideas - efficiently in both time and costs :::

    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611
                https://www.egenix.com/company/contact/
                      https://www.malemburg.com/



More information about the pydotorg-www mailing list