Help Horizontal Accordion

Author Message

Javier Olara

Wednesday 22 June 2011 6:27:06 am

Regards
I'm working on a "extension Horizontal Accordion" for ez publish the template ezwebin. My idea is to create two classes, for example:
Accordion gallery
Accordion Image
Use the Pluing "nikki-liteAccordion-08a68f0" (http://nicolahibbert.com/horizontal-accordion-jquery-plugin/) but I failed to make funsion please
If you would like to help.
Sorry, could create a tutorial and send it, I'm new ez publish.
This is the code:

 

<h1>liteAccordion - a horizontal accordion plugin for jQuery</h1>
        <div style="height: 320px; width: 960px;" id="one" class="accordion dark rounded">
            <ol>
                <li>
                    <h2 class="selected" style="width: 320px; height: 48px; left: 0px;"><span>Slide One</span><b>1</b></h2>
                    <div style="width: 720px; left: 0px; padding-left: 48px;">
                        <figure>
                            <img src="liteAccordion%20-%20a%20horizontal%20accordion%20plugin%20for%20jQuery_files/1.jpg" alt="image">
                            <figcaption style="display: block;">I can haz big caek?</figcaption>
                        </figure>
                    </div>
                </li>
                <li>
                    <h2 class="" style="width: 320px; height: 48px; left: 768px;"><span>Slide Two</span><b>2</b></h2>
                    <div style="width: 720px; left: 768px; padding-left: 48px;">
                        <figure>
                            <img src="liteAccordion%20-%20a%20horizontal%20accordion%20plugin%20for%20jQuery_files/3.jpg" alt="image">
                            <figcaption style="display: block;">Whoops.</figcaption>
                        </figure>
                    </div>
                </li>
                <li>
                    <h2 class="" style="width: 320px; height: 48px; left: 816px;"><span>Slide Three</span><b>3</b></h2>
                    <div style="width: 720px; left: 816px; padding-left: 48px;">
                        <figure>
                            <img src="liteAccordion%20-%20a%20horizontal%20accordion%20plugin%20for%20jQuery_files/2a.jpg" alt="image">
                            <figcaption style="display: block;">Some caption text goes in here...</figcaption>
                        </figure>
                    </div>
                </li>
                <li>
                    <h2 class="" style="width: 320px; height: 48px; left: 864px;"><span>Slide Four</span><b>4</b></h2>
                    <div style="width: 720px; left: 864px; padding-left: 48px;">
                        <figure>
                            <img src="liteAccordion%20-%20a%20horizontal%20accordion%20plugin%20for%20jQuery_files/5.jpg" alt="image" width="768">
                            <figcaption style="display: block;">Pew pew pew!</figcaption>
                        </figure>
                    </div>
                </li>
                <li>
                    <h2 class="" style="width: 320px; height: 48px; left: 912px;"><span>Slide Five</span><b>5</b></h2>
                    <div style="width: 720px; left: 912px; padding-left: 48px;">
                        <figure>
                            <img src="liteAccordion%20-%20a%20horizontal%20accordion%20plugin%20for%20jQuery_files/2.jpg" alt="image">
                            <figcaption style="display: block;">More caption text here!</figcaption>
                        </figure>
                    </div>
                </li>
            </ol>
            <noscript>
                <p>Please enable JavaScript to get the full experience.</p>
            </noscript>
        </div>
<script>
    $('#one').liteAccordion({
    onActivate : function() {
        this.find('figcaption').fadeOut();
    },
    slideCallback : function() {  
        this.find('figcaption').fadeIn();
    },
    autoPlay : true,
    pauseOnHover : true,
    theme : 'dark',
    rounded : true,
    enumerateSlides : true            
}).find('figcaption:first').show();
</script>

scrieler _

Wednesday 06 July 2011 1:20:26 am

Welcome to eZ,

 please use code Tags for the code

(insert literal text, u find it in the editor menu bar)

There are a few possibilities to create this jQuery Accordion, I would create a container class 'accordion_container' and the child class 'accordion_part'.

If an accordion_container class exist, load the jQuery and fetch his childs and loop his content (name and image) in the needed li.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:21:44
Script start
Timing: Jan 18 2025 02:21:44
Module start 'layout'
Timing: Jan 18 2025 02:21:44
Module start 'content'
Timing: Jan 18 2025 02:21:45
Module end 'content'
Timing: Jan 18 2025 02:21:45
Script end

Main resources:

Total runtime0.7825 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.9844153.4531
Module start 'layout' 0.00570.0040 742.437539.3984
Module start 'content' 0.00970.7713 781.8359490.4219
Module end 'content' 0.78100.0014 1,272.257816.1641
Script end 0.7825  1,288.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4033160.0002
Check MTime0.00130.1632160.0001
Mysql Total
Database connection0.00070.094910.0007
Mysqli_queries0.728693.1167540.0135
Looping result0.00050.0628520.0000
Template Total0.755496.520.3777
Template load0.00190.243420.0010
Template processing0.753596.290220.3767
Template load and register function0.00020.020610.0002
states
state_id_array0.00070.093710.0007
state_identifier_array0.00110.135320.0005
Override
Cache load0.00170.2203860.0000
Sytem overhead
Fetch class attribute can translate value0.00070.083220.0003
Fetch class attribute name0.00120.150420.0006
XML
Image XML parsing0.00020.031120.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00050.0685100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs