Toggling features without content reload

This demo demonstrates possibility of toggling certain features entirely client-side. Plain Reading View toggle behaves exactly like in previous example but Normalized View functionality is equivalent to the Diplomatic View from the previous example but avoids making a request to the server. This result is achieved by toggling CSS classes on selected elements (see pb-toggle-feature name="norm2" for configuration). Please note that results of the PM transformations via ODD need to be prepared in a way that returns content required by both toggle states and matching CSS specifications need to be also passed (see "dantiscus.odd" treatment of e.g. .choice, .choice-alternate and br).

Diplomatic View toggles between two values for the mode parameter ("norm" and "diplomatic"). This parameter is passed on to the server and available in the ODD to inform PM transformations - as a result treatment of choice elements changes, e.g. abbreviations are expanded ("V.S./Vuestra SeƱoria"). Similarly, Page View switches between whole document ("single") or paged view. Translation switches between the transcription and translation parts of the text (note that translation view makes no sense with the "Page" switch on for our example as the pages were not encoded in the translation). Three last toggles all influence server-side processing thus require making a request to the server when the setting is changed. Client-side toggles ("Plain Reading View" in this case) are applied afterwards to the results returned from the server.